Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Answered

How to display text of the lookup field on the data table in PowerApps for dynamics 365?

Posted on by 1,638

Hello Everyone,

By default the lookup fields on the data table in PowerApp is showing the GUID. How could I replace it with the text value?

I am able to display text value of the lookup field on the form using Lookup() function. But for data table how it can be done? Please help.

forum.png

  • RachRoberts Profile Picture
    RachRoberts 5 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    This did the trick. Is it essentially duplicating fields in CDS?

    It's odd that I can pull data out using the export to excel, but I can't pull the values in Power Apps, as they are. I've tried using the Gallery option that I read about, but I could not get that to work either. I don't know how to capture the value of the lookup CDS field, without doing the method mentioned above with creating a whole new field that references another.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    All, I know this answer comes a bit late.... but I had the same exact problem and wanted to shared how I went about resolving it.

    In my case, the lookup was not into accounts, but into another custom entity that represented a collection of Assets. I needed to display in my data table the asset serial number, but also some other attributes in addition to the serial.

    My data table is displaying a series of records than the end user is collecting via the PowerApp. These records are being captured in a CRM entity called 'EventRecords'

    My EventRecords entity obviously has my lookup to my ASSETS entity and inside CRM it displays the actual serial number of the Asset.

    If I selected the Lookup 'Serial' field in my datatable connected to 'EventRecords' I get the GUID display (like your accounts above)

    What I did is I created a calculated field in the EventRecords entity I called 'Serial_Label' of type SINGLE LINE (text) and I defined it as: =ASSETS.serial_number (which contains the actual textual form of the serial)

    Then I published and refreshed all schemas and voila, now in my datatable I can select the field 'Serial_Label' that effectively displays the serial number of the related asset instead of the GUID.

    You can apply the same technique for other attributes of the lookup entity.

    Hope this helps

  • Verified answer
    Piyush Paliwal Profile Picture
    Piyush Paliwal 817 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Take a look at this video, I feel most of the functionality that you want have been covered here. www.youtube.com/watch

    Let me know if this helps and please mark the answer if I was able to help you resolve the issue.

  • Inkey Solutions Profile Picture
    Inkey Solutions 1,638 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Can anyone please share me some links or steps for creating an editable grid type look and feel using Gallery control or any other way in the PowerApp?

  • Suggested answer
    Piyush Paliwal Profile Picture
    Piyush Paliwal 817 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Yeah, a classic use case for a PowerApp. Unfortunately, at this time the only option that I can think of is creating a Gallery instead of Data Table and building up the CRUD functionality on top of it.

    An easy way to achieve this would be to use a pre-defined template (you can use this by going to web.powerapps.com and clicking "Start with Data" and choosing Dynamics 365 in connector), see screenshot below

    PowerApps.pngThis template would do the following

    • Build the basic layout with different forms and screens
    • CRUD operations built-in

    You can then go ahead and tweak it per your needs.

  • Inkey Solutions Profile Picture
    Inkey Solutions 1,638 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    I want to add a subgrid to my powerApp that will show the collection of records. I could edit each of the records, create new record from there as well as delete each of them.

    I was trying to achieve this using data table and an edit form. On select of each record in the data table, I am populating that record in the edit form and using a button I am updating the record in CRM. But the look and feel is not good.

  • Piyush Paliwal Profile Picture
    Piyush Paliwal 817 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Yes, you are right, apologies I missed that part. The data table in its current form in PowerApps has a few limitations and I guess you have hit one of them. I would recommend going the Gallery path for doing this. You can easily create a gallery and replicate the look and feel of a data table. I do understand that it involves a lot of work on your part but looks like that is the option that you would have to go with.

    Any particular reason to stick to Data Table?

  • Inkey Solutions Profile Picture
    Inkey Solutions 1,638 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Thanks for the response.

    Please read my question carefully. I know the concept of Lookup() function. And I have successfully used it in a form control too.

    But, I cannot find the property on the data table control, where I could apply the same function for one of it's lookup field.

    Please let me know if you need more clarification on my question and please help.

  • Suggested answer
    Piyush Paliwal Profile Picture
    Piyush Paliwal 817 on at
    RE: How to display text of the lookup field on the data table in PowerApps for dynamics 365?

    Hey, this is a very common question when working with Dynamics 365 and Lookups in PowerApps. A simple google search would have given you the results. Here is a link which you can follow and addresses the exact problem you are having.

    www.inogic.com/.../working-on-lookup-field-of-dynamics-365-in-powerapps

    PS: Mark the answer as verified if this helps you resolve the issue.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

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

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,252 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,089 Super User 2024 Season 2

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans