cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sabvalbra
Level: Powered On

Retrieve a field from a Form two screens later

Good Afternoon,

 

I've got a problem with some field, that I cannot manage to retrieve.

 

I've got in Screen1 a NewForm(Form1) linked to the entity Contact in dynamics 365.

 

 

In this Form1, I have the contactid (DataCard1) of my entity (who is at first empty, because I haven't submitted my Form)

 

Then two screens later, let's say Screen3, I SubmitForm(Form1) ; and now I need to store my Contactid in a Collection. And I cannot manage to give the good name such that, PowerApps recognize that I want the contactid of my lastSubmitted Form.

 

Do you have any idea ?
I've tried a lot of things and nothing seems to work....

 

Thanks a lot

 

Sabrina

4 REPLIES 4
Super User
Super User

Re: Retrieve a field from a Form two screens later

Hi @Sabvalbra I haven't tried exactly what you are saying but my first thought is have you considered storing that ID in a global variable when you leave screen1? That way you would have that value easily accessible? There may be a better way but without digging into the details my first thought is a variable sorts you out pretty easily. 

 


Shane

Shane - Microsoft MVP, YouTube, and PowerApps Consulting for when you are in a bind to get this fixed quickly. And finally we now have PowerApps Training
Power Apps Staff mabolan
Power Apps Staff

Re: Retrieve a field from a Form two screens later

Hey @Sabvalbra, I believe you might be able to use the "LastSubmit" property of the form control like so...

 

Form1.LastSubmit.ID

The "LastSubmit" property grabs all of the data you sent via SubmitForm.

 

Let me know if that doesn't work.

Sabvalbra
Level: Powered On

Re: Retrieve a field from a Form two screens later

Good Afternoon,

 

And thank you for your so quick answers.

 

@Shanescows 

I've already tried this solution and the problem is that before I submit the "Form1", the "contactid" doesn't have a value. So I cannot store it on Screen1. And then on Screen3, when I submit Form1, I would like to recuparate the "contactid", but I cannot manage to retrieve it...

@mabolan

That's strange, because with your solution, it works only once on two. Don't know why... Maybe I need a refresh or something...
I cannot find...
Capture21.PNG
Here you can see on the CRM that it works once on two (when it is (Pas de nom), it's correct)
And the other half of the time I get the error :
Capture22.PNG

Here is my code :
Capture23.JPG

 

Hope you have an idea...

I'm triying things but for the moment, unsuccessful

Sabvalbra
Level: Powered On

Re: Retrieve a field from a Form two screens later

(Sorry for posting twice)

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (8,875)