When beginning the process you select one of the commodity buttons. Each button will take the user to another screen pertaining to the conditioning of the selected commodity. If yes, is selected how do I transfer the data that has been selected. For example, the commodity would be avocado, with yes being selected dry matter between 23-25 should be conditioned four days. What formula is used for this process?
I'm not sure what the errors are from your screenshot, but you'll need to adapt the example code to your specific situation. For instance, if the commodity dropdown is writing to a lookup field, you'll need to structure the default property as an object . If it's a choice field, the name of the produce should exactly match one of your choices.
As for your next question, the location of the question "Is your dry matter percentage between 23-35%?" depends on your app's layout.
For example:
Navigate('Edit Details Screen', Transition.None, { varCommodity: "Avocado", varConditioningDays: 4})
Another option, If the variables need to persist in multiple screens, you can also use what called a global variable. Use is similar, but defined using a set command:
Set(varCommodity, "Avocado");
Navigate(EditScreen)
Rick,
Thank you so much for responding! I did the suggested and the default property for the commodity dropdown is not working. Also, how can I use a context variable for the conditioning days on the same screen. For example, conditioning days for dry matter between 23-25 would be four days, 25-27 three days and 27-29 two days. How do I get this information inserted on the form depending on if the question is answered yes or no?
For storing this type of information, you can use a variable. In this case, you can send the selected commodity to the next screen using a context variable.
To achieve this, you would use an OnSelect
property for your "Avocado" button like this:
Navigate('Edit Details Screen', Transition.None, { varCommodity: "Avocado" })
Then, on the page with your form, in the Default
property of your commodity dropdown, you can use the following logic:
If(!IsBlank(varCommodity), varCommodity, ThisItem.Commodity)
You would apply similar logic in each of your buttons to change the default commodity type as needed.
Hope this explanation is helpful!
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Cheers!
Rick Hurt
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.