Hi All,
I created a PowerApps Application from a SharePoint List. The list name is "Client Information" and in that list, I have a column named touch Point a Yes/No choice column.
Each row (or client) in my Application Gallery changes colour based on the value in the touch Point Column.
TemplateFill = If(ThisItem.'Touch Point'.Value= "Yes", RGBA(255, 0, 0, 1),RGBA(0, 255, 0, 1))
Now, I would like the value in touch Point to change when the user selects a client. For example, if the current value is Yes, I want the value to change to No. I tried Patch and UpdateIf but can't get to that result.
Can someone help me fix my formulas?
OnSelect = If(ThisItem.'Touch Point'.Value="Yes",Patch('Client Information',ThisItem.'Touch Point',{'Touch Point': {Value:"No"}}))
Cheers,
Thebaz
Solved! Go to Solution.
Hi @TheBaz
Put an icon in the gallery and set its OnSelect property to
UpdateContext({tp: !tp});
If(
tp,
Patch(
'Client Information',
ThisItem,
{'Touch Point': "Yes"}
),
Patch(
'Client Information',
ThisItem,
{'Touch Point': "No"}
)
)
This will toggle the Touch Point from yes to no.
Hi @TheBaz
Put an icon in the gallery and set its OnSelect property to
UpdateContext({tp: !tp});
If(
tp,
Patch(
'Client Information',
ThisItem,
{'Touch Point': "Yes"}
),
Patch(
'Client Information',
ThisItem,
{'Touch Point': "No"}
)
)
This will toggle the Touch Point from yes to no.
Thank you for your assistance. I ended up with this script, but I accepted your answer since it helped be aswell.
If(
ThisItem.'Touch Point'.Value = "No",
Patch(
'Client Information,'
BrowseGallery1.Selected,
{
'Touch Point': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: "Yes"
}
}
),
Patch(
'Client Information',
BrowseGallery1.Selected,
{
'Touch Point': {
'@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Value: "No"
}
}
)
)
User | Count |
---|---|
195 | |
123 | |
86 | |
48 | |
40 |
User | Count |
---|---|
281 | |
165 | |
139 | |
80 | |
76 |