cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Help with passing context in navigate

Being a non-developer, I need help to get the following please.

 

Basic CRM-type App: One "Customer" can have multiple "Contacts". In the Customer screen there is a button to add a new contact for that Customer. So the context variable that I need to pass onto the new Contact Form is the Customer Name. I seem to be doing something wrong in my reference as I cannot get the new form to default to the Customer Name from the previous screen.

 

Kindly advise if you are able to detect the error from the attached screenshots.

(hypethetical data used)

 

1: The formula used OnSelect for the button in question

 

screen1.PNG

 

 

2. The value of the record that I am trying to pass on to the next screen

 

screen2.PNG

 

 

3. The place where I am trying the value to end up which is not working.

 

screen3.png

 

 

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

NewForm() places the form in "New" mode thereby causing the form to pick default values. Default values are what are configured on the datasource directly not through PowerApps.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Please offer alternative solution for the objective. The goal is merely to create a "sub-record", i.e. Attach a Contact Person to the Company Header record. That should be possible. 

 

I got somehat further, but issue is not fully resolved.  Using the below OnSelect formula it now populates the customer in the next screen. However it seems that this is not recognised within the app since I get the below error when I try to submit the formThe only way around it seems to create a duplicate field and manually choose from the dropdown exactly the same value. Perhaps its something to do with the ID not being updated when the default value is set.

 

There must be a better way. I would appreciate your assistance. 

 

CaptureA1.PNGCaptureA2.PNG

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,534)