cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IMathur
Helper V
Helper V

Patch the label text in Gallery Items in SharePoint list column

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:

IMathur_0-1596786500553.png

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 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Community Support
Community Support

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

View solution in original post

5 REPLIES 5
TurboTape
Resolver I
Resolver I

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

Hi @TurboTape

How to set the source as Errors(source)?

By source you mean, data source ?

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 🙂

IMathur
Helper V
Helper V

Hello All, 

Please Help on the issue, i am in urgent need of this!

v-siky-msft
Community Support
Community Support

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

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Solution Authors
Top Kudoed Authors
Users online (4,411)