adrian-g
(Adrian)
April 13, 2023, 12:47pm
1
Hi
In an Evaluate block with input variables ācontentā and āassetNameā (the latter set to āCoreā), why does the first FQL query below work, while the second one using a variable yields null?
content[primaryEntity.name="Core"].id
content[primaryEntity.name=assetName].id
How can I get this query to work with a variable?
Output:
(2) [āff32e03ab003ā, null]
See also the flow in my public workspace: New Flow | Help | Postman API Network
Many thanks!
arlem
(ArlƩmi Turpault)
April 13, 2023, 4:51pm
2
Have you tried using the āstringā block to set the variable value instead?
adrian-g
(Adrian)
April 14, 2023, 5:03am
3
Hi arlemi
Thanks for your reply. Iāve checked. Itās the same with a string block.
arlem
(ArlƩmi Turpault)
April 14, 2023, 9:30am
4
I tried a couple more things and couldnāt get that to work either. Looking at the docs I couldnāt find a way to do it either so Iām just assuming this isnāt something you can do in the Evaluate block. Letās see if someone else has more info!
adrian-g
(Adrian)
April 14, 2023, 10:26am
5
Thanks, Arlemi. Iāll move this topic to the Help category, as it doesnāt seem to be a beginnerās question anymore.
arlem
(ArlƩmi Turpault)
April 14, 2023, 2:37pm
6
Good idea! Someone suggested using:
(
$n := assetName;
content[primaryEntity.name=$n].id;
)
which should give you the same result as content[primaryEntity.name=assetName].id
.
adrian-g
(Adrian)
April 14, 2023, 3:14pm
7
This works. Many thanks for your help!
1 Like
Iām having a similar issue to @adrian-g .
Output to evaluate looks like this:
When I evaluate without grabbing the id, it evaluates boolean for each payroll record.
But when I try to get the id of the record that matches $n, it returns null, and Iām not sure whatās wrong.
I figured it out. I had that extra period between āpayrollsā and ā[pay_date=$n].idā and that was throwing it off.
1 Like
system
(system)
Closed
November 2, 2023, 6:33pm
10
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.