I have an SP List that has a column with "Week #" - this is a number column. So I might have a week number= 1 for example.
If there a way I can have a button in Powerapps that triggers an update to the week number? So I will like that when I click the button, the week number changes to 1+1 for example.
Solved! Go to Solution.
You can to this using Patch function. Set OnSelect property of button to:
Patch(SharePointListSource, ThisItem, {Week#: ThisItem.Week# + 1})
Use internal name of Week# column in formula.
If you are not using any gallery and want to update list item using it's ID then use:
Patch(SharePointListSource, {ID: 2}, { Week#: LookUp(SharePointListSource, ThisRecord.ID = 2, Week#) + 1 })
Here 2 is ID of SharePoint list item.
Check below references for more information:
Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it 👍
Hi@Canadiansal,
Could you please tell me more about your data configuration, is there only a Number column named 'Week#'?
Based on the issue that you mentioned, do you want to update the records related to the week 1?
If I understand correctly, I think the UpdateIf function could achieve your needs.
UpdateIf(SPlist,'Week#'=1,{'Week#':'Week#'+1})
Hope it could help you.
Regards,
Qi
You can to this using Patch function. Set OnSelect property of button to:
Patch(SharePointListSource, ThisItem, {Week#: ThisItem.Week# + 1})
Use internal name of Week# column in formula.
If you are not using any gallery and want to update list item using it's ID then use:
Patch(SharePointListSource, {ID: 2}, { Week#: LookUp(SharePointListSource, ThisRecord.ID = 2, Week#) + 1 })
Here 2 is ID of SharePoint list item.
Check below references for more information:
Please click Accept as solution & 👍 if my answer helped you to solve your issue. This will help others to find the correct solution easily. If the answer was useful in other ways, please consider giving it 👍
I should clarify.
So there will be multiple week values in the list. so there might be 1,2,3 etc., I will like for my button to only update the value in week 1 - not all the values.
Hi@Canadiansal,
Could you please tell me more about your data configuration, is there only a Number column named 'Week#'?
Based on the issue that you mentioned, do you want to update the records related to the week 1?
If I understand correctly, I think the UpdateIf function could achieve your needs.
UpdateIf(SPlist,'Week#'=1,{'Week#':'Week#'+1})
Hope it could help you.
Regards,
Qi
User | Count |
---|---|
251 | |
106 | |
96 | |
50 | |
39 |