Forum Discussion
markikav1955
May 25, 2021Brass Contributor
Calculate the number of times a choice variable is used
Hi I have a "Status" column that is manually updated by the users throughout the process as the process moves forward. One status = 'Rejected' and they want to be able use this status at any poin...
RobElliott
May 25, 2021Silver Contributor
markikav1955 one way to do it would be to have a JSON-formatted button in your list that the project team would click when they want to reject an item. You would also have a column in your list for the number of times each item was rejected. The button triggers a flow in Power Automate that would update the list item and increment the number of times rejected column for that item by 1. If you need specifics about any of this just shout.
Rob
Los Gallardos
Microsoft Power Automate Community Super User
markikav1955
May 25, 2021Brass Contributor
Hi Rob
Yes specifics would be great.
They are using an InfoPath form for data entry presently so could the button be presented on such form? If not its ok I can tell them if rejecting something just use the list view.
Thanks for the help..
Yes specifics would be great.
They are using an InfoPath form for data entry presently so could the button be presented on such form? If not its ok I can tell them if rejecting something just use the list view.
Thanks for the help..
- RobElliottMay 25, 2021Silver Contributor
markikav1955 InfoPath, if it even works with modern SharePoint lists, is no longer supported.
Rob
Los Gallardos
Microsoft Power Automate Community Super User- markikav1955May 25, 2021Brass ContributorHi Rob
That is fine, so is this possible solely through Power Automate or does it need some json too in the list?
Thanks
Mark- cloudshobhitbhallaMay 26, 2021Copper ContributorCreate a new list column in SharePoint to store count number. you can make hidden in edit and new list form as required. Trigger a Power Automate on list item created / Updated. Then update that counter field. No more json will require by this way. Try to update list field by calling rest Api so that you need to updated only one field. In the flow trigger conditions mention your user account so it will not stuck into the infinite loop. Generally we use a different account/ service account to trigger and update list items.
Thanks
Shobhit