This “Tip” is a little report, with a sample app, on my own attempt to familiarize myself with the new INPUT() function. As @praveen has indicated, the advent of this function gives us the power of an “UPDATE EXISTING ROW(s) using values from this row” action:
Here’s a sample app I made to test this out:
This extremely simple app has two tables: one with multiple records and one with only one record. The input function allowed me to make an action that takes a value (a word, in this case) from the record I happened to be viewing on the bigger table and then write it to the designated spot on the smaller table.
Here’s how I put it together.
- On the single record table I made the following action:
The expression is as follows:
In this case “Word_input” is just what I decided to call this function. You can make up just about any function name you want, I think. I set “AppSheet” as the default but in my application the default is just a placeholder because my app doesn’t use it; it always takes the value from the other table. So, I think the default value could be just about anything and it wouldn’t make an important difference in my app.
Before we go on, let’s take a look at how this action functions in isolation. In the app, I’ve set the action to display prominently with the label “WRITE WORD”:
I’ll hide this writing action when I actually use INPUT() in a working app of mine but I made it visible in the sample. If you tap on it inside the “Single word” menu, this happens:
Since the action hasn’t received a value for “Word_input”, it asks the user to provide it. The next step provides that value so the app doesn’t need to ask for it.
- On the big table, I made the following action:
Since “word_input” was part of the referenced action, I was able to select it and define it with a column name.
That’s it!! Works just fine!