Hi,
We are creating a Power App that takes information from a SharePoint list (the Inventory List) and populates another SharePoint list (the Change Log). Here is a rough outline of the process:
The Power App is essentially a SharePoint form for the Change Log. We have updated the default values for this form to populate with the appropriate values from the Inventory List. Here is the form:
In certain cases, we require updates because information is missing in the inventory. To accommodate this, a Param is encoded in the link in the initial email that sets the noRequiredUpdate variable to true or false. In turn, that true or false value is applied to the Visible property on the No Changes Needed group (red button) to hide it.
For reference, here is the OnStart statement used to pull in that Param and set the variable:
Set(noRequiredUpdate,Value(Param("noRequiredUpdate")))
What I am trying to do, is set the Change Status value based on the button that is selected with the hope to hide the field on the form. If the Submit Changes value is clicked, I want the Change Status value to be "Submitted"; whereas if they select No Changes Needed, the Change Status value should be set to "No Changes Submitted".
I have tried setting a variable ChangeStatusVari for the buttons' OnSelect properties:
Set(ChangeStatusVari,"Submitted")
However, I can't seem to get the lookup statement correct for the DataCardValue5 to work:
Here is my Default property that I am setting:
LookUp('SharePoint Sites & Teams Change Log'.'Change Status','Change Status'.Value=ChangeStatusVari,ThisRecord)
I have confirmed that my ChangeStatusVari variable is being set:
Does anyone have any suggestions on what the Lookup formula should be on my Default property for this DataCard?
Thanks in advance,
Thomas
First, you do not need the "ChangeStatus" to be a dropdown. It could be just a label or a text field, because you dont require the user to make changes to it, it is a behavioral field.
On your "SubmitChanges" button, add
Patch(Datasource,Record,{ChangeStatus:"Submitted"})
And for your "No changes Needed",add
Patch(Datasource,Record,{ChangeStatus:"No changes Submitted"})
Do let me know, if you want to go with the drop down so i show you what to do, I do find the proposed solution to be easier and less tedious
If you find this post interesting, give it a thumbs up, you can also accept it as a solution to allow other to find it.
User | Count |
---|---|
261 | |
110 | |
89 | |
54 | |
44 |