Hi All,
I'm trying to run a flow that will only calculate the time elapsed based on the values in column "Workforce Type". The flow should make the column "Elapsed Time FlowTest" look like column "Elapsed Days". The column "Elapsed Days" is a calculated column that calculates the days since from the "Requested Date Test" column based on if column "Workforce Type" doesn't equal "Yes". If it equals "Yes", it blanks out the elapsed days. My flow currently calculates the elapsed days for all column cells. How do I add the condition based on the "workforce type" value?
Flow:
the expression for set variable varElapsedTime is:
div(sub(ticks(formatDateTime(utcNow())),ticks(outputs('Get_item')?['body/RequestedDate'])),864000000000)
@Hardesh15Perfect, this worked. This was exactly what I was looking for. Thanks a bunch!
@Hardesh15I see. It's a "Choice" column type with internal name of "WorkforceType".
We use filter to reduce time for further flow execution. Example- suppose you need certain line items for specific column value then using filter query give only required result.
Filter query expression-
SharePoint list internal column ne 'value' . ne means not equal to and single quote is very important. For internal column go to list settings then click on column name after than see your url last part which is your internal column name.
What is your column type which has Yes value?
Thanks
Hardesh
@Hardesh15No. I have not used any filter query in any of the get items actions. I think I see where you're going though. Maybe enter an ODATA filter query that only gets list items where items under "Workforce Type" does not equal "Yes"? If that would work, what would be the formula? Disregard if this is not a good idea.
@Hardesh15Sure, let me try explaining in another way. When the flow triggers, it should loop through each item under column "Workforce Type" to see if it doesn't equal "Yes". If this is true, then the flow should for each item under column "Elapsed Time FlowTest", calculate how many days it's been since the date under "Requested Date Test".
If each item under column "Workforce Type" does equal "Yes", the flow should NOT calculate the days, so there should be no value under column "Elapsed Time FlowTest". Hope I explained it better. If not, let me know.
"will only calculate the time elapsed based on the values in column "Workforce Type"." i am not able to understand this part as later you wrote "If it equals "Yes", it blanks out the elapsed days". please give more details
Thanks
Hardesh