I have what is (hopefully), a very simple query. I am still new to Powerapps but can't find an easy answer to this anywhere.
I have a display form in Powerapps which contains details of a specific customer in my 'Customers' list.
When I click the 'Create Job' button on that form, I want to open a new item form, and pass the customer_id field from current customer into same field on the Create Job form (connected to my 'Jobs' list). I already have a working button on the display form which opens the Create Job form and stores the current customer_id field in a collection, but I can't work out how to pre-populate the customer_id field with the collected value. I assume I need to enter a function into the 'Default' property of the customer_id datacard, but I can't find the correct syntax.
Both fields are simple text fields, and I don't want the field to be editable on the Create Job form (technically it doesn't even need to be visible).
For reference, my source data is all in SharePoint. I don't know if it's possible to pass the data directly from one form to the other, or if it needs to be collected first, but I'm happy with whatever works.
Many thanks
Solved! Go to Solution.
On the Onvisible of the First where the the first form is, set a variable:
Set(VarMyItem,TextBox1.Text) where you store customer_id field
Then in the Default Textbox2 of the Second form put: VarMyItem
The variable stores the input in textbox1 for Textbox2.
Please change the names of Textbox1 and Textbox2 to reflect your actual names
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
On the Onvisible of the First where the the first form is, set a variable:
Set(VarMyItem,TextBox1.Text) where you store customer_id field
Then in the Default Textbox2 of the Second form put: VarMyItem
The variable stores the input in textbox1 for Textbox2.
Please change the names of Textbox1 and Textbox2 to reflect your actual names
------------
If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.
It is easy when you know how!
Excellent, that has worked perfectly, much appreciated.