web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Passing data card valu...
Power Apps
Unanswered

Passing data card values from one form to another using Variables

(0) ShareShare
ReportReport
Posted on by 38

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.  

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Cargue96 

    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.

  • Cargue96 Profile Picture
    38 on at

    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

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Cargue96 

    Gotcha...so 6 different lists.

     

    Still...link through the Item property.  What is the Item property of your forms?

     

  • Cargue96 Profile Picture
    38 on at

    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!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Cargue96 

    No problem...

    No, looking for the Item property of your forms.  Click on a form and then look at the Item property.

  • Cargue96 Profile Picture
    38 on at

    Hi,

     

    The Item property for each of the forms is clear as shown in the image below

     

    Cargue96_0-1666107255660.png

     

  • Cargue96 Profile Picture
    38 on at

    How do I get the second form to reference form 1 via the item property?

     

    Many thanks!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Cargue96 

    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?

  • Cargue96 Profile Picture
    38 on at

    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!

     

  • Verified answer
    RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @Cargue96 

    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})

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard