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!
1 Like
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.