'Home Button', Set Column Value (Clear Value) Question

Hi All,

I have an app where the user enters an agreement number on the first screen:

They then select a pump serial number from a choice component:

…and receive an unlock code:

The agreement number and unlock code are filled into the data table (I would like it to be the selected pump serial number instead, but for this to work I have to ‘write to’ the unlock code column):

The ‘home’ button sets the column values of the agreement number and selected pump serial number back (clear value). If I don’t do this, those valuesare still pre-filled for the next user.

I want to clear the values, but also want to keep the data. Ideally, the entered agreement number and selected serial number would be copied to another table, then the fields cleared. Is this possible (or another workaround that you can think of?)

If you want the values to be retained and unique for each user, then you should be using user specific column so users won’t be bumping into each other.

I’m not sure I understand what the problem is here. Since you have buttons, I would expect the button to be writing the appropriate values to the table. But at the same time, each entry and selecting should already be writing to the table as you change them.

Hi Jeff,

If I make the columns ‘user specific’, will the data be retained then when my ‘home’ button clears the column values?

When I say that I would really like the pump serial number to be recorded, I can make this happen by writing to that field (changing the ‘write to’ column and ‘values’ column’). But if I do this, this prevents the unlock code being displayed:

Jeff - I don’t have time to weigh in on this now, but this seems to be related to the below question:

The above might provide some additional context.

1 Like

Can you explain step by step from being to end your app flow? Which table is the screen attached to? What purpose does each table serve? Are you following @Darren_Murphy’s solution in your other thread exactly as he wrote it?

1 Like

Hi Jeff,

Yes, I did follow Darren’s advice.

There is the home screen with a number entry component for ‘agreement number’. Once that number is within a set range, the visibility of the ‘unlock pump’ button is set to appear.

That button performs a ‘show detail screen’ action.

On the detail screen, there is a choice component where the user selects the pump serial number. This writes data to the ‘unlock code’ column, with values ‘unlock code’, displays as ‘pump serial number’.

There is then a text component set to display the data from the unlock code column. When a user selects the pump serial number, the related unlock code is displayed in the text component.

All works, but then I set my home button to clear the values of the columns so that all fields would be blank for the next user. This also then (obviuosly) clears the data in the table. I’m wondering if I can keep that data and perform a different action with the home button to achieve the same thing.

There is currently only one table, with the following columns:

First, I don’t think you are following @Darren_Murphy’s instructions exactly. It will be a lot cleaner and easier if you have a single row table with user specific columns that will be used only for your inputs and screens. That table should never have more than one row. Your final button should take those inputs and write them to another table, followed by the clearing of the user specific input columns. You can stick with your current setup that shares the same table for inputs and outputs, but things could get weird if you start deleting rows.

Another suggestion is to use ‘Show New Screen’ → ‘This Item’ for your first button instead of ‘Show Detail Screen’. I won’t get into why, but it will save you trouble in the future. Detail screens become linked to the table, whereas new screens are always independent.

Ok, I think this is the piece I was missing. So you want both the underlying unlock code and the displayed serial number to be written to the table, correct?

I think what I would do is change your choice component to write the same serial number that is displayed. Then create a single relation column that links the serial number to the table that contains the serial number and unlock codes. Then add a lookup column to return the unlock code. That way you will have all three values in your table. With that setup, your final button can be set up with a custom action to first Add Row to the output table, followed by a Set Column action to clear the inputs.


Thank you Jeff for taking the time to reply. I’ll try this when I get the chance and let you know how I go!

1 Like

Sorry Jeff, what action can I use that will do this?

The ‘Add Row’ action.

Thank you Jeff, that was exactly what I needed…I had been looking for some sort of ‘copy field’ action or something, I’d tried ‘add row’ but without adding the second table first.

I’m (almost) there. The only thing that I can’t get to work is writing the serial number to the new sheet.

In order for the serial number selection to reveal the unlock code, I need t have these settings (otherwise the code is not revealed):

Because I have ‘write to’ unlock code, and ‘values’ unlock code, the serial number is not written. I can’t get the unlock code reveal to work if I change those settings to be the pump serial number.

I’ve tried to get my head around relations etc but am still new to the game. If I had to only write the unlock code to get the reveal to work, could I use a relation to then display the serial number that related to that unlock code? All codes are unique to the serial number

I outline above how to do this.

Don’t write the unlock code. Just have it write the serial number.

the relation should link the serial number you chose to the serial number in the table that contains the serial/unlock combinations. (Pump serial + code)

The lookup column will return the unlock code from the relation.


Job done, thank you Jeff!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.