Hi there,
I am try to build a flow to identify total count based on value stated at 2 or more columns.
Example:
Column A = Reff #
Column B = Phone #
I want the flow to calculate if Reff# + Phone # entered first time = 1 and if same info of Reff# + Phone # entered second time, the column will update as "2" and the count will continue as long as both criteria met.
This is a live list meaning user can immediately see the count once they submit new entry.
I do not required the column to be running index but any workflow that somehow benefit the same would be greatly appreciated.
Thank you!
Solved! Go to Solution.
Hi @DarkStaarX ,
Based on the error details you provide, it seems that you are using a wrong internal column name.
You could find the way in @WillPage 's reply.
@WillPage was careful to give detailed solutions, so I don't want to plagiarize the answer, I just see that you seem be stuck.
In addition, you could click on the list settings to get the internal column names.
Best Regards,
Charlie Choi
The flow is triggered when an new row is added to the table? Depending on the data source you can use an OData filter query to get the relevant rows (if any) from the table.
I'll assume it's SharePoint but you can also do Odata filter on SQL amongst others.
So, go Get items and select your site and list. In the Odata filter query box go Column_x0020_A eq 'triggerBody()?['Column_x0020_A']' and Column_x0020_B eq 'triggerBody()?['Column_x0020_B']'
N.B Don't type it like this. triggerBody()?['Column_x0020_A'] and triggerBody()?['Column_x0020_B'] should be put in the expression editor or just drop the dynamic content from the trigger between a set of single quotes (if it's a string column). Spaces in your column name will be _x0020_ for SP and SQL data sources but other special characters will be subbed out with their own codes. You can see the internal column name by examining the dynamic content from the trigger with a mouse-over after you drop it into the filter query or in a Compose.
If you get your filter query working properly that action will only return rows where those two columns match exactly. You can then count them with the expression length(body('Get_items')?['value']) in a Compose, which may be 1 if there are no matches (your same row that triggered the flow will be 1). You can then sub(length(body('Get_items')?['value']),1) to take that number away from the total
Thanks Will! Glad that this is doable!
I am not good with expression and kind of stuck here but yes, you are right, this is SharePoint list. What I got here:
Don't put the column names in single quotes, only the dynamic content from the trigger. It should look similar to this:
This is what I got..... Seems like I am lost and need your help like a baby needing help to walk...
Hi @DarkStaarX ,
Based on the error details you provide, it seems that you are using a wrong internal column name.
You could find the way in @WillPage 's reply.
@WillPage was careful to give detailed solutions, so I don't want to plagiarize the answer, I just see that you seem be stuck.
In addition, you could click on the list settings to get the internal column names.
Best Regards,
Charlie Choi
User | Count |
---|---|
88 | |
40 | |
23 | |
20 | |
16 |
User | Count |
---|---|
128 | |
50 | |
47 | |
35 | |
25 |