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 / Preselection a Dropdow...
Power Apps
Answered

Preselection a Dropdown Item from LookupGallery.Selected Item

(0) ShareShare
ReportReport
Posted on by 30

I have 2 tables: 

  • Accounting-POs
  • Accounting-POs-Items

The "Items" are each related to a PO by way of a field called "RelatedPO" which is a lookup for "Accounting-POs".  In a form to add an Item to a PO (that has been selected from a gallery) The "RelatedPO" dropdown where you select the current PO from the list need to be populated with the PO selected from the gallery originally.  I have tried everything and this below is the only code for the "Default" field that doesn't show any errors but also doesn't populate the field.  

 

 

LookUp(Choices([@'Accounting-POs-Items'].RelatedPO),Value=POGallery.Selected.'P.O.')

 

 

What can I do to get the Master PO Item from the gallery to be selected automatically in that field...

Categories:
I have the same question (0)
  • Jessetechno Profile Picture
    30 on at

    I tried it and while its not throwing any errors after some work, it still isn't populating the dropdown.  The RelatedPO in the Items list is showing the "P.O." columb from POs.  

     

    • Accounting-POs ("P.O." field)
    • Accounting-POs-Items (RelatedPO = "P.O.") 

    But it isnt populating.  And according to the monitor there is no lookup happening when I open a New Item form.

  • Jessetechno Profile Picture
    30 on at

    Sadly its a no-go. I guess i'll have to think of something else.  Or Patch the whole form (so much work).

    chrome_zLY2buTNQY.png

    chrome_zLY2buTNQY.png
  • Verified answer
    Jessetechno Profile Picture
    30 on at

    I feel stupid right now... but I figured it out.  You dont put it in the Default property... you put it in the DefaultSelectedItems property!  

     

    Mudassar, your code was altered and worked perfectly:

    If(POItemsItemAddEdit.Mode=FormMode.New,LookUp(
    Choices('Accounting-POs-Items'.RelatedPO),
    Value = LookUp(
    'Accounting-POs',
    ID = POGallery.Selected.ID
    ).'P.O.'
    ),Parent.Default)

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 345 Most Valuable Professional

#2
11manish Profile Picture

11manish 207 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 177

Last 30 days Overall leaderboard