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 / Passing Lookup Field V...
Power Apps
Unanswered

Passing Lookup Field Value from Custom Page (Canvas) to New Record Form (Model-driven)

(1) ShareShare
ReportReport
Posted on by 193
I have a custom page in my model driven apps, and I and building in a button that will navigate the use to a new record form and will fill in certain fields with data I specify. I am following the instructions here: Use Power Fx in custom page for your model-driven app - Power Apps | Microsoft Learn
 
I can get the default values to work for a text field, but I do not know how to pass a lookup value from the custom page to the form. I have tried referencing a record First(Table1) and just the GUID First(Table1).RecordGUID but the field on the form remains blank. Not sure what syntax I have to use for this to work. 
 
Thanks
Categories:
I have the same question (0)
  • BhargavPatel Profile Picture
    660 Moderator on at
    If I understand your question completely, are you trying to show the lookup value selected in the custom page in the model driven form before the lookup value is saved to the table? If so, why are you not saving the value to the table first? Can you post some screenshots and the JS to provide more details?
  • CAH2035 Profile Picture
    193 on at
    @BhargavPatel
    There is no JS involved (but maybe there needs to be?)
     
    On my custom page (below image) I want user to select a row in the table and then click that Pending Control button.

     
    The button has the below PowerFx
    Navigate(
        Patch(
            Defaults(Collections),
            {
                Page: 'Collections (Forms)'.'Control Collection Referral',
                Comments: Table1.Selected.Patient.'Patient UID',
                'Related Patient': Table1.Selected.Patient
            }
        )
    )
    For the sake of testing, this function should navigate the user to the specified form for the Collections table as a create form (which it does), it should populate the comments field with the Patient UID (which from the custom page screenshot would be PT-1036, as text), and then should set the "Patient" lookup field to the patient record that is selected. When I do this though, the comment does get set to the value I expected, but the Patient lookup field is blank. 



    Because the navigate function is passing this information as parameters, I don't know if I should be referencing a lookup record in some other way rather than just "Selected.Patient", and the help page documentation doesn't explain how to do this for a lookup field. I am not sure if it is even possible. 
  • RobinFierens1 Profile Picture
    25 on at
    I have the same issue 
     
     
    But in my case the lookup field gets filled in correctly but with the (No Name) value, however when I click on it its navigates to the correct Case type.

    I was wondering if you could help?

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard