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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Populating a lookup fi...
Power Apps
Unanswered

Populating a lookup field with data thats already existent in the same Dataverse Table.

(0) ShareShare
ReportReport
Posted on by 11

I would be looking to move the data in a "single line of text" type field to a lookup field.  The Number in the single text data field is the exact number the lookup column uses, in fact I can just copy and paste it to the lookup field and select the parent table and its linked.  If its possible I would like to run a flow on the existing child table to populate all the records lookup fields so they all show up in the related section of the parent and subgrid.  That relationship is already set up and works fine, which is why i can just copy and paste the number in the text field to the lookup field manually within the App.

 

If so, should I expect to run into any issues in the flow if any of the child records don't have their parent table row loaded yet?  this isn't a big deal, its just been a month or so since I imported the parent accounts so I'm sure some of the child tables rows that are being imported from salesforce wont have a parent loaded in the dataverse yet since more project have been sold since then.  Of course I will be running the parent table import again before its said and done, this is purely for my testing purposes.

 

I cant figure out how to successfully run the child table flow import mapping the lookup field.  I was able to make this happen when i was trying it using power query, using keys, but that didn't work well for our data source and was only bringing in one child row per parent account, when some parent accounts have hundreds of related child account.  I was told power Query couldn't handle that and that the flow was using, but that came with a whole new set of errors for any fields that were not single row text, currency or date fields. So now I can get all the child rows imported for the child table, but I'm sitting with the data that needs to be in the lookup field existing as a single line text row under the lookup field on the page in the app to just copy/paste it.

 

So long story short, can I make a flow to populate that lookup field with that existing data in the single line text field?

I have the same question (0)
  • Verified answer
    thomasfnorthrup Profile Picture
    252 on at

    Hello, thanks for reaching out. 

    You can absolutely do this in a Flow. I have outlined the steps below. 

    1. Trigger Flow Instantly - this will allow you to manually run the flow
    2. List Rows component - for all projects (parent)
    3. List Rows component - for child record type
      1. Filter rows where string field contains the value from the Project
        1. For example new_stringfield eq 'project field dynamic output'
      2. I assume your string field has a value of 123 and that value is in a field on the project?
    4. Update Row component - for child record type 
      1. Where Row ID = the unique id from the child record selected in the second list component
      2. Set the lookup field to the dynamic content for the string field from the list child records component
    5. End

    Flow will place these in For Each loops so the flow will iterate through all projects, look for any child records that match and update each one of those children's lookup field.  This will not do anything if the project does not have any child records yet or there are child records that do not have parent records. 

     

    Please mark as solution or give kudos if this helped. 

    Have a great day!

  • Fubar Profile Picture
    8,340 Super User 2025 Season 2 on at

    As you will be matching on Text, make sure the Table you are looking up does not have duplicates.

     

    Be mindful of how many records you are dealing with List rows in Flow has a default max of 5,000 records it will return this can be increased up to 100,000 but beyond that you have to write your flow so that it can loop the dataset.

     

    If it is a once off, I would just create a Model Driven App with the 2 tables in it and create a view with the Lookup field and the Text field in it and use Export to Excel then in Excel just copy the value from the Text column to the Lookup column save it and then import it as an update (can do up to 100,000 records).

  • marigot_padua Profile Picture
    2 on at

    Hi, how do you set the lookup field to the dynamic content for the string field from the list child records component? When i'm trying to search for the dynamic content for the list child records component (which is the action 'List Rows 2') it doesn't pop up when I search for it. I can only see List Rows (which is the first List Row action for the parent).

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard