Hi Experts,
I have a label in the gallery item and gives the value of true/false on the basis of certain values being only calculated in PowerApps. See the image below:
Gallery is using sharepoint list as data source.
Now i want to assign this value of the respective label for each gallery item in the column 'ViewFilter'.
I want this action to happen at the start of the app.
Below is that syntax that i am using in Onstart of App:
Patch(datasource, LookUp(source, ProjectStatus.Value= "Completed"), {ViewFilter: CProjects_Gallery1.Selected.Label31.Text})
But this formula is not giving any errors but not saving the true/false value of the label in the column.
Please help on
Solved! Go to Solution.
Hi @IMathur ,
This is a simple logic issue that you want to patch the CProjects_Gallery1.Selected.Label31.Text to the ViewFilter column, but the Patch function is triggered at the start of app, before the gallery is selected, so nothing can be saved to SharePoint list.
The workaround is to Either hard-code the value into the Patch formula or adjust the trigger of the Patch formula.
Hope this helps.
Sik
Hi IMathur
Is the field a true / false field in Sharepoint, in that case you need to feed it true false data (not text).
You han do it by using if statement (If label31.Text="Completed"; true ; false).
Ekstra free tip. If you dont get any errors, but things dont work as intended. Try this:
Create a gallery somewhere on the screen. Set the source to Errors(source). Add the items as text field inside the gallery. I think its 3 or 4 fields. Now you will get a list of errors that occure when you try to patch. Maybe this will help you find exactly what the problem is if the ture false thing at the top didnt work 🙂
Best Regards
Tommy
I was a bit fast I see.
If you have a source (ie. sharepointlist called Data). You put the following in Items in the Gallery:
Errors(Data)
In the gallery you set Labels for The 3 or 4 items you can choose from (something like this :ThisItem.Error, ThisItem.Code, ThisItem.Message)
If any errors occure when you working with this data source, they will show up in this gallery.
I hope this was more clear 🙂
Hello All,
Please Help on the issue, i am in urgent need of this!
Hi @IMathur ,
This is a simple logic issue that you want to patch the CProjects_Gallery1.Selected.Label31.Text to the ViewFilter column, but the Patch function is triggered at the start of app, before the gallery is selected, so nothing can be saved to SharePoint list.
The workaround is to Either hard-code the value into the Patch formula or adjust the trigger of the Patch formula.
Hope this helps.
Sik
User | Count |
---|---|
254 | |
106 | |
92 | |
47 | |
37 |