Skip to main content
Community site session details

Community site session details

Session Id : 6Jw5OZoFxDQMQla2DXMD7S
Power Apps - Microsoft Dataverse
Answered

List rows, Filter Rows fails with NULL value

Like (0) ShareShare
ReportReport
Posted on 10 Oct 2022 08:38:37 by 67

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. 

PietPoelsma_0-1665390623219.png

 

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.

PietPoelsma_1-1665390789086.png

 

How can I solve this issue?

 

Kind regards,

Piet

 

 

Categories:
  • PietPoelsma Profile Picture
    67 on 12 Oct 2022 at 05:46:07
    Re: List rows, Filter Rows fails with NULL value

    Thx @joaodsantos as stated above I went for your first suggestion.

     

    Regards,

    Piet

  • PietPoelsma Profile Picture
    67 on 12 Oct 2022 at 05:45:26
    Re: List rows, Filter Rows fails with NULL value

    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

  • JoĂŁo Santos Profile Picture
    323 on 10 Oct 2022 at 15:51:12
    Re: List rows, Filter Rows fails with NULL value

    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

  • Gowri Halan Profile Picture
    262 on 10 Oct 2022 at 15:19:10
    Re: List rows, Filter Rows fails with NULL value

    @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

  • PietPoelsma Profile Picture
    67 on 10 Oct 2022 at 09:43:32
    Re: List rows, Filter Rows fails with NULL value

    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

     

  • Verified answer
    JoĂŁo Santos Profile Picture
    323 on 10 Oct 2022 at 08:51:12
    Re: List rows, Filter Rows fails with NULL value

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 637 Most Valuable Professional

#2
stampcoin Profile Picture

stampcoin 570 Super User 2025 Season 2

#3
Power Apps 1919 Profile Picture

Power Apps 1919 473

Featured topics