cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TMMK64571
Helper I
Helper I

Passing data card values from one form to another

I have been scouring these Messages with no hope for my efficiency quest.  I need to take 5 values from one form whose source is a SharePoint List and pass them to another form who source is a different SharePoint List.  I want to take a description, a requisition number, a requester name, an email address and a toggle choice and pass them to the other form, before an attachment is added and all submitted to the separate list.  I don't want to make the admin enter the data twice.  My original idea was to capture these values as variables from the gallery selection and set the data cards of the new form to them, but that was unsuccessful.  What is the correct way to do this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @TMMK64571 ,

How do you navigate from your first screenshot form to your second screenshot form? Via pressing the "SUBMIT & GO TO SEND" button?

Do you want to pass the data card values from the first Form to your second form after your submit your first form?

 

Based on the needs that you mentioned, I think a global variable could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSuccess property of the Form1 (First form) to following:

Set(CurrentSubmittedRecord, Form1.LastSubmit)    /* <- Add this formula */

Then within the second form in your "Submit to Purchasing" screen, you could referenve the values from the submitted form1 data through the following formula:

CurrentSubmittedRecord.ColumnName

 

Set the Default property of the Text Input box within Title data card to following:

CurrentSubmittedRecord.Description

Set the Default property of the Text Input box within Requester data card to following:

CurrentSubmittedRecord.'Requester Name'

Set the Default property of the Text Input box within Email data card to following:

CurrentSubmittedRecord.Email

Set the Default property of the Text Input box within 'Number with Leading Zeroes' data card to following:

CurrentSubmittedRecord.'Req Number'

Set the Default property of the RUSH Toggle control to following:

CurrentSubmittedRecord.RUSH

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

7 REPLIES 7
mdevaney
Super User III
Super User III

@TMMK64571 

I feel that posting some screenshots of your app would help me towards making a recommendation

First screen lets the admin update the assigned number and the signature dates.

Update_Screen.PNG

The second screen is where I want the passed data to go, along with a pdf attachment. The List it populates triggers a flow that creates an email with a specific subject line and renames the attached pdf in a specific way for the Purchasing bot to read.

Submit_Screen.PNG

Hi @TMMK64571 

 

Assuming the first form submits data to data source (assume formname is form1) (using SubmitForm action) and then you redirect to second screen

 

in second screen you can just use form1.LastSubmit which will give you the context of the item

Now to fetch data values just use form1.LastSubmit.ID,form1.LastSubmit.Title etc. and use them to populate your data cards in second form

 

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

In the OnChange property of each input In the first form that you want to pass to the second form just type:

1. For the text inputs:

Set(_VarName1, InputName1.Text)


2. For the toggle button:

Set(_VarName2, ToggleName.Value)

Then, on the second form, set the default property of each control to the corresponding variable.

This works as intended.

You can take @RezaDorrani solution. However, that solution only works if you update the first form always first so you can use the LastSubmmit command. The downfall of that solution is that you cannot submit the two forms simultaneously.

The downfall of the solution I proposed is the usage of global variables (which I try avoiding if I can).


Hope this helps you!

v-xida-msft
Community Support
Community Support

Hi @TMMK64571 ,

How do you navigate from your first screenshot form to your second screenshot form? Via pressing the "SUBMIT & GO TO SEND" button?

Do you want to pass the data card values from the first Form to your second form after your submit your first form?

 

Based on the needs that you mentioned, I think a global variable could achieve your needs. I have made a test on my side, please take a try with the following workaround:

Set the OnSuccess property of the Form1 (First form) to following:

Set(CurrentSubmittedRecord, Form1.LastSubmit)    /* <- Add this formula */

Then within the second form in your "Submit to Purchasing" screen, you could referenve the values from the submitted form1 data through the following formula:

CurrentSubmittedRecord.ColumnName

 

Set the Default property of the Text Input box within Title data card to following:

CurrentSubmittedRecord.Description

Set the Default property of the Text Input box within Requester data card to following:

CurrentSubmittedRecord.'Requester Name'

Set the Default property of the Text Input box within Email data card to following:

CurrentSubmittedRecord.Email

Set the Default property of the Text Input box within 'Number with Leading Zeroes' data card to following:

CurrentSubmittedRecord.'Req Number'

Set the Default property of the RUSH Toggle control to following:

CurrentSubmittedRecord.RUSH

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Tapesh
Responsive Resident
Responsive Resident

Hi @RezaDorrani @mdevaney @v-xida-msft @WarrenBelz  

 

Im trying to get the value form One Datacard to another, i have two different Datacards in two different froms. Any Idea how can this be copied or can passe the value which is been input to onedatacard?

 

Example: I have two different forms and both are submitted at the same time on one click. 

 

Datacard 1(inform1)

Name: AmountCard

Input: DatacardValue72

 

 

Datacard 1(inform2)

Name: weektotalCard

Input: Datacardvalue8

 

 

i tried to get the value as DatacardValue8.Text and pass to the Default property of amountcard, but seems like not working for me. 

 

any guesses or ideas? 

@Tapesh 

This thread was closed 5 months ago.  Suggest you create your own new thread if you'd like to ask a question.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

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.

Top Solution Authors
Top Kudoed Authors
Users online (62,124)