Return value of one column based off the value of another column

I have a appsheet database and Column 1 is called Task and it is a enum list, The user selects this in a form and a time stamp is generated and a timer starts when they hit save after filling out the form. There is a current jobs view which they can select the job and stop timer when they are down with the task and then a time stamp is added to a Stop Time Column, and then a Duration column does the math from the Start Timer Column and the End Timer Column and then I have a Time column that converts that duration to seconds. I have multiple columns that are labeled as the same as the options in the Tasks column, So Printing, Breakdown, IT, etc... What I want to do is have the Printing column auto fill by looking at column 1 (TASK) and seeing if it says Printing, then take the completion time from the Time column and put it in the Printing column. 

I have tried multiple expressions, But i am not sure what I am doing wrong or even if there is a better way to do it to get the same result. Pretty new to appsheet.  

Solved Solved
0 5 2,309
1 ACCEPTED SOLUTION

Not sure if I understand your question. A screenshot of your data table and current code would help a lot. Based on:


@Tmusky wrote:

What I want to do is have the Printing column auto fill by looking at column 1 (TASK) and seeing if it says Printing, then take the completion time from the Time column and put it in the Printing column.


I would say the bellow code would fulfill your request. Put it in the "App Formula" field in the Printing column.

 

IF([TASK] = "Printing", [Time], "")

 

If the TASK column has the "Printing" value, then this column value will be the same as the TIME column. Otherwise, it will be blank. You could do the same for all other columns, just changing the text comparison and time column. Take a look at:

IF() - AppSheet Help 

Define App formulas and Initial values - AppSheet Help 

 

View solution in original post

5 REPLIES 5
Top Labels in this Space