Bridge: Variables Passing Through to Child as Text, Not a Value. "{{variable}}" instead of 123124932

WORKFLOW PURPOSE: first it gathers and populates our entire users list to a sheet. This child workflow is supposed to use /users/{{userId}} to populate the DETAILS of each user onto the matching row that was just populated.
Butβ¦
I can't get Smartsheet Bridge to pass-through the variables I've set to the Child Workflow. Looking in the Child Runlog under Trigger, it's passing the variable names (in quotes) as the value instead. This causes my API call, trying to get user data, to fail.
- Variable = rowId
- What it should be = 416871435936141 (example)
- Passes Through As = "{{states.Child B Javascript-Map userId and rowId.javascript.run_script[run_index].rowId}}"
and
- Variable = userId
- What it should be = 956271465736148 (example)
- Passes Through As = "{{states.Child B Javascript-Map userId and rowId.javascript.run_script[run_index].userId}}"
Child Log screenshot below:
_____________________________________________________________________________________________________
Here are the details of my workflows to help you determine the problem.
CHILD WORKFLOW
PARENT WORKFLOW
Javascript details:
Values you cannot see in JavaScript Element:
- columns = {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.columns}}
- sheetRows = {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.rows}}
- users = {{states.Get Users List ALL.call_api.make_api_call.response.data}}
Here's an excerpt of the Javascript log file which appears to be working fine:
[{ "rowId": 1234567890123456, "userId": 2345678901234567 },{ "rowId": 3456789012345678, "userId": 4567890123456789 },{ "rowId": 5678901234567890, "userId": 6789012345678901 },{ "rowId": 7890123456789012, "userId": 8901234567890123 },{ "rowId": 9012345678901234, "userId": 1234567890123456 },{ "rowId": 1122334455667788, "userId": 2233445566778899 },{ "rowId": 9988776655443322, "userId": 8877665544332211 },{ "rowId": 1029384756102938, "userId": 5647382910564738 },{ "rowId": 9182736450918273, "userId": 6273849501627384 },{ "rowId": 3847561920384756, "userId": 1928374650192837 }]
Child Workflow: Run Child B Details
Values you cannot see in Run Child Workflow Element:
- columns = {{states.Get Sheet Round 2.smartsheet.get_sheet.sheet.columns}}
- rowId = {{states.Child B Javascript-Map userId and rowId.javascript.run_script[run_index].rowId}}
- userId = {{states.Child B Javascript-Map userId and rowId.javascript.run_script[run_index].userId}}
In the # of Runs = {{states.Child B Javascript-Map userId and rowId.javascript.run_script.result}} works to run the child workflow the correct # of times but it doesn't pass through correctly. Using the value of 1 or leaving it blank all result in the same issue.
-Neil
Best Answer
-
Well, I answered my own question again. I guess posting it clearly really gets you thinking of new ideas, right?
Here's how I did it:
I didn't realize that by passing the rowId and userId through to the child using the "Child Entity Values", it was breaking it. So I just removed them and it's working. duhhhhhhhhhhhhβ¦β¦β¦ Thanks for those opening this forum post with an intent to help!!!-Neil
Answers
-
Well, I answered my own question again. I guess posting it clearly really gets you thinking of new ideas, right?
Here's how I did it:
I didn't realize that by passing the rowId and userId through to the child using the "Child Entity Values", it was breaking it. So I just removed them and it's working. duhhhhhhhhhhhhβ¦β¦β¦ Thanks for those opening this forum post with an intent to help!!!-Neil