Hi All,
I have a few forms which I am using to submit data, I am utilising Form 1 as the parent form and wish to pass data card values from Form 1 to the other forms barring one data card which can be amended for all the forms.
I have figured to set the Onchange property for the data card values of Form 1 as variables, I have managed to get it working for Text values but have hit a roadblock when it comes to dropdowns.
The on change of the datacard for my Form 1 is follows Set(UrgencyV,UrgentDataCardValue.Selected.Value).
However, when I put the corresponding variable into the data card in the other forms, I get an error and it states this is the issue.
"The property on this control expects Table Values, the rule produces Text Values which are incompatible"
What should I be displaying the variable as so that it is compatible, I have scoured the internet but to no success
I also have combo boxes and dates in the form to, should I be doing anything different for any variables I set for them also?
Also happy for anyone to provide with a better way of passing data card values to other forms rather than the method I have selected.
Solved! Go to Solution.
Okay...so since your other forms are all based on different datasources, you can easily do the following.
1) Set all of your other forms to Edit mode as the default. Never put them in New Mode!
2) Set the Item property of the other forms to reflect values from your master form.
example - let's say there is a Title column and a Date column in the master form and you want that in the other forms, which happen to have a Title column and Date column as well.
Then your Item property formula on the other form would be:
Patch(Defaults(yourFormDataSource), {Title: masterForm.Updates.Title, Date: masterForm.Updates.Date})
Are your forms all for the same record? In other words, are you splitting a form into multiple forms?
If so, then your forms should all be linked via the Item property. This would provide the conduit for the values to go from one to the other.
There is no need for "program-like" variables and OnChange actions, just reference the form records through the Item property.
To be more specific, I would need to know more about what your current design is in regard to the forms and if you are in fact splitting a record form.
I hope this is helpful for you.
Hi Randy,
I am not splitting one form into multiple forms. There are multiple forms (up to 6 to be precise), whereby I wish for all the data from the parent form (Form 1) to be displayed in the other 5 forms, there will be one datacard value which will be unique, and I will amend for each form, then once I submit, I get 6 new records all with the same data except the unique Identifier.
So, I am trying to find a way where the other 5 forms just copy the information from the first form, which saves me time from having to put the information in 6 times.
Hope this makes sense!
Many Thanks
Gotcha...so 6 different lists.
Still...link through the Item property. What is the Item property of your forms?
Hi Randy,
So, the Item Property for the Data card values?
for my urgent column this is the Items Property of Data Card Value 1 for Form1 : Choices([@'XXXXX'].Urgent).
The two choices are urgent or not urgent.
How do I get the choice I make in Form 1 to replicate in Form 2 under my Urgent Data Card Value 2? Do I just reference that in the Items property? What should that look like?
Apologies for so many questions I am quite new to power apps and have been learning as I go along, really appreciate the help!
No problem...
No, looking for the Item property of your forms. Click on a form and then look at the Item property.
Hi,
The Item property for each of the forms is clear as shown in the image below
How do I get the second form to reference form 1 via the item property?
Many thanks!
So then your forms are all in "New" mode?
How are you starting this process? In other words, is there something that the user will click on in order to be presented with the form(s)? If so, what is the formula there? Are you performing any NewForm functions anywhere?
Hi Randy,
All the forms are in new mode as you have correctly pointed out.
Form 1 will be displayed as you navigate to the screen and then an Icon will be clicked to display the other forms, the formula on this is the onselect property: UpdateContext({DisplayAllForms:!DisplayAllForms})
Hope this makes sense!