Calculate the number of times a choice variable is used

Brass Contributor

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 point in the process AND also track how many times this particular status was applied.

Is it possible to use a calculated column to track that (i.e. the number of times a particular choice item was saved) or is there another way to implement this.

 

So for example I am at "Status C" but the Team want to push back so select "Rejected".

The person responsible will pick up the item, fix it and move back to Status C.

Then it comes back and there is another issue the Team want to reject it again and also want to highlight the number of times now they have had to reject the item, in this case twice.

 

Thanks for any ideas! 

5 Replies

@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

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..

@markikav1955 InfoPath, if it even works with modern SharePoint lists, is no longer supported.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Hi Rob
That is fine, so is this possible solely through Power Automate or does it need some json too in the list?
Thanks
Mark
Create 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