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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (38,277)