Forum Discussion

Hayden_Jenkins's avatar
Hayden_Jenkins
Copper Contributor
Oct 23, 2019
Solved

Calculated Column Using Number Data to Return Different Values

Hi, I am trying to use a calculated column (that's using data from another calculated column) to return a string based on some simple conditions.   Background: I have a powerapp that collects data ...
  • ChrisWebbTech's avatar
    ChrisWebbTech
    Oct 23, 2019
    Gotcha. I would create a new column in that case, use flow to process or loop through the list and update the column to the appropriate value, then add the logic to the button to record the value in the list going forward so you don't have to maintain a flow and powerapp and it'll make more sense if anyone needs to go edit it later.

    Flow would be started using flow button (You can run it manually when ready to go from the flow editor)
    Throw in a getitems action to get all items in list.
    Update Item action using the getitems ID this will add it to a loop.
    You can then put a condition in front of it to handle the shifts based on the calculated date, or if your feeling randy figure out how to use a flow expression and do it in a single step. This is basically like calculated column nesting if's to set the value in a single action instead of using conditions.

    You could basically do this flow for a single item, once you get it working, then go back and and in the get items part and do the loop through.

    Another tip, don't forget to go in and set paging or pagination? Something like that so it allows to pull more than 100 records in the loop. It's in the settings of the getItems action i believe.

Resources