In a Cloud Flow I make use of the Dataverse Action: List rows . I want to select the GUID of a reference/parent table from a child table using the foreign key value in the child table.
When this foreign key value is filled there is no issue, however the relationship between the parent & child table is optional and I get a run time error when this field is not filled.
How can I solve this issue?
Kind regards,
Piet
Thx @gowrihalan04 for your suggestion. In the mean time I implemented the solution as suggested by @joaodsantos . It's a bit more work, but very readable which is a good thing as well.
Regards,
Piet
Yup, was going to suggest something similar to what @gowrihalan04 posted, but directly on the List Rows action.
Set the filter rows to an expression that checks if there's a value on the lookup, if there is use it otherwise use a all zeros guid, something like this:
if(equals(empty(triggerOutputs()?['body/_parentcustomerid_value']),null),'00000000-0000-0000-0000-000000000000',triggerOutputs()?['body/_parentcustomerid_value'])
Haven't tried it either but some version of this should work I think. Just replace the triggerOutputs()?['body/_parentcustomerid_value'] on the formula which I used as an example for you own field.
Hope this helps
@PietPoelsma You might try one more option. Add a variable step in flow keep some default value in it (say 0 or 0000-0000 (empty guid)) and set child record id to it. and use variable in your condition. So you may not end up in error instead Dataverse will try to find record with 0 and might return nothing.
I havent tried this approach. But give it a try
Thanks @joaodsantos ,
I guess that would work and thought of that myself. I was kind of hoping to apply some kind of OData command to avoid 'clicking' a lot of power automate actions. It's approximately 20 columns in several scenario
Regards
Piet
Hi,
I would say you might just need to put this action within a condition. If KPI_TAG_MERK is not null then do your list rows action, otherwise terminate flow
That will avoid any errors
stampcoin
17
mmbr1606
13
Super User 2025 Season 1
ankit_singhal
11
Super User 2025 Season 1