web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power Automate - List ...
Power Apps
Answered

Power Automate - List Rows with LookUp

(0) ShareShare
ReportReport
Posted on by 159

I'm working in a flow using Dataverse connector and List Rows action.

I have two tables Appoint and Client

In the table Appoint the column ClteId is a LookUp column pointing out to table Client (many-to-one).

In the "Select columns" option of List Rows action, I want to declare columns from table Appoint and columns from table Client.

I've wrote down a FetchXML query. If I do not include in the query a link-entity reference everything goes well.

But when I include in the query the link-entity sentence the List Rows action is trying to retrieve from the server in a loop.

See attachments

Any idea of what is wrong?

 

Best regards

att 4.jpg
att 3.jpg
att 5.jpg
I have the same question (0)
  • Prakash4691 Profile Picture
    1,332 on at

    @alovalpwa ,

    Please find below fetch xml query. Test 1 and test 2 are two entities. Test 2 has lookup of test 1. For below query, I am getting test 2 name from lookup.

     

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
    <entity name="cr5b9_test2">
    <attribute name="cr5b9_test2id"/>
    <attribute name="cr5b9_name"/>
    <attribute name="createdon"/>
    <order attribute="cr5b9_name" descending="false"/>
    <link-entity name="cr5b9_test1" from="cr5b9_test1id" to="cr5b9_test1" visible="false" link-type="outer" alias="a_a08f4df0d2fceb1194ef6045bd72e732">
    <attribute name="cr5b9_name"/>
    </link-entity>
    </entity>
    </fetch>

     

    As I mentioned earlier, try to formulate fetch xml from advanced find or fetch xml builder from xrmtoolbox.

    If it answers your question, kindly give kudo and accept it as solution.

     

    Regards,

    Prakash

  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @alovalpwa,

    Couple of things I noticed:

    • Your FetchXml looks good apart that you're missing the alias property in the link-entity element. Add a friendly alias and then the results from the link entity will return in the format "aliasname.columnphysicalname"
    • You also applied a filter in the filter box. I don't think both are supported (I may be wrong). Apply the filtering directly in your FetchXml instead since you using FetchXml.

    Hope this helps!

  • alovalpwa Profile Picture
    159 on at

    @EricRegnier 

    I still have the same issues, the list row action retries and get internal server error in a loop.

    The filter expresion is "addHours(startOfDay(utcNow()),-2)".

    How could I write it down in FetchXML query?

    Regards 

    Captura de pantalla 2022-03-30 103438.jpg
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Yup if I understand the logic correctly you can use the last-x-days operator. Example:

    <fetch>
     <entity name="account" >
     <filter>
     <condition attribute="createdon" operator="last-x-days" value="2" />
     </filter>
     </entity>
    </fetch>

    Note: all dates are already stored as UTC in Dataverse.

    Also, your initial FetchXml was cleaner, you can omit all the properties in the <fetch> tag and remove the visible property from the link-entity tag.

    Hope this helps!

  • alovalpwa Profile Picture
    159 on at

    @EricRegnier @Prakash4691 

    I have found the mistake in my fetchxml query (in the from of link-entity).

    But now I'm not able how to reference the "alias.cltefirstn" column in the CSV table.

    See attachments

    Captura de pantalla 2022-03-30 212854.jpg
    Captura de pantalla 2022-03-30 212955.jpg
  • Verified answer
    EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    You need to reference the property with an expression, example:

    Expression format: items('apply for each name')?['alias.cltefirstn']

    EricRegnier_0-1648669099888.png

     

  • alovalpwa Profile Picture
    159 on at

    @EricRegnier 

    It was hard but I've got it.

    And now my last question for this time.

    My target is to create a text file separated by semicolons .

    I don't see how to change that when I create the CSV table.

    Any advice?

    Thank you very much

    Captura de pantalla 2022-03-30 223309.jpg
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Haven't fully tested but you can try Replace "," with ";" in a Compose action. Expression:

     

    replace(body('Create_CSV_table'), ',', ';')

     

     

    EricRegnier_0-1648672943971.png

     

  • alovalpwa Profile Picture
    159 on at

    @EricRegnier 

    It does not work

  • alovalpwa Profile Picture
    159 on at

    @EricRegnier 

    Sorry.

    Yes it works.

    Perfect

    Thank you very much

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 101 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard