SUMMARY:
We now have an INPUT(, ) function that can be used to define inputs that are dynamically โboundโ to values via user input or via other actions that compose them.
This is a beta feature but available for anyone to try. If you run into issues please let us know. As always, we would love your feedback and suggestions.
This addresses two popular feature requests:
This only works today for limited scenarios involving the SetColumnValue action being invoked from a Ref Action. Thereโs more coming that extends this mechanism to Add Row actions and to automation tasks.
DETAIL:
Much of the basic AppSheet app interface uses โCRUDโ operations โ in particular, add/update operations on row data driven by the column structure of the tables. We automatically generate interfaces (UI or data change actions) for these CRUD operations based on the schema. Using these interfaces, end-users or application logic can โinvokeโ CRUD operations and pass in the appropriate โinputsโ to configure them.
However, more advanced AppSheet interfaces use Actions (in UI and automation) and Tasks and Processes (in automation). Actions, Tasks, and Processes are logical operations rather than physical operations. We currently use expressions to configure the behavior of these logical operations. But so far, we had no mechanisms to pass dynamic โinputsโ into them. It is important to do so as AppSheet apps have a compositional model โ individual elements can be composed into more complex elements. In the case of actions, individual actions can be composed into complex actions. Inputs for actions are a mechanism to โparametrizeโ the logic so that the same action can behave differently depending on how it is composed.
See Dynamic inputs for data change actions | AppSheet Help Center for detailed description
This is fantastic!
Thanks @praveen
It doesnโt support DATETIME field Type?
Hi there!
Thanks for the new function. It is really gonna be amazing.
Iโm having a problem with it right now
I call the function via an action so the user has to enter a simple text to change a field in the form. The pop-up appears with the options (the field type is โenumโ), the selected text appears in the form when selected but when the โsave buttonโ is pressed nothing happens and the pop-up window stays there. Just when the โcancel buttonโ is pressed the pop-up window disappears but the changes donโt apply.
I suppose itโs a bug while it gets full implemented so I hope this helps because itโs a great function. If is not a bug, please tell me so I can make the corrections
ฤรดi khi tรดi cลฉng bแป lแปi nhฦฐ vแบญy.
Same problem here, the changes occur but save doesnt work, so only option is to cancel.
This is working well for me. As a part of my own process of learning by doing, I made a sample app and put it in a tip:
Personally, I was interested in this new INPUT() function and made the sample app because I wanted to use INPUT() to reduce the impact of virtual columns on the performance of an app of mine. Hereโs the idea:
Iโm working on a dictionary app with a database of over 8,000 basic English words. One important function of the app is to prepare links to a moderately large number of online dictionaries.
The โold wayโ I did this was to have a โView B,โ built from the same table of 8,000 words, that needed lots of virtual columns of text on to which to โhangโ the inline actions that link to external web sites. With over 25 such virtual columns, that meant holding more than 200,000 cells in the appโs memory. That was OK on my iPhone but not on my less powerful Android device.
So, my โnew wayโ is to use the input() function to copy the data for which the links are required (see my tip if youโre not sure how to do this). This is sort of a โjust in timeโ approach. Instead of storing 8,000 versions of everything so that they will be ready if needed, I just have the app make the required data when the user taps on a group action to navigate to the view holding the links. I still need the same number of virtual columns but 25 columns times 1 row is a lot less than 25 times 8,000.
Iโm happy to report that the app now works quite nicely on my weaker Android device. And, in my case, the UX of the app is exactly the same as that of the โold wayโ version โ all of the changes were โunder the hood,โ so to speak, so I didnโt have to sacrifice anything in terms of interface design.
Perhaps others whose apps are weighted down by virtual columns can employ a similar strategy to lighten them up.
Hello there.
And if I want to provide a list of options to the user ?
Ex:
I have, lets say, 3 customers to which I can sell parts and at the moment of marking a part as SOLD I want to ask to whom its sold.
Can the INPUT be used combined with a drop down list or something like that?
The INPUT dialog will follow the same rules as whatever you set for the column in general, just like in a Form. So to have a dropdown list, youโd setup the column as an Enum, or with a List-returning Valid_if. It shouldnโt have anything to do with the INPUT() expression itself.
Or Suggested Values
I used it, working without problem
Hi,
It works with datetime field, but the placement of the pop-up should be in center rather than upper right corner. Also, for datetime, it does not show complete field and some portion of right is not visible. Even calendar icon is not visible.
Please make required changes.
the placement of the pop-up should be in center rather than upper right corner
Maybe on phones have it centered, but for Tablet or Browser, I like the pop-up being in the top right.
Users can quickly edit a couple of columns with an inline action while referencing the related rows in the table. Very useful.
@praveen When you copy an Action โData: execute an action on a set of rowsโ and change the Referenced Table, you will get this Error message:
Workaround:
.
.
For those who get stuck on this error and find themselves unable to delete the action, you can switch from grid to list view in the actions editor:
.
.
And then youโll be able to delete the action before it can throw this error:
.
.
Keep in mind that you might have to do a full refresh of the page to even have the opportunity to delete the action after this shows up.
Ugh, thanks for reporting. Weโll get this fixed.
Great feature! Thanks!
Useful for eg. sending reports as email (pop-up to fill in email addresses that also triggers a BOT).
And updating tasks and reports with new status (not having to make separate actions leading to specific update-views or quick edit). Much better UX with INPUT().
I havenโt figured out how to get initial values in the INPUT().
The โdefaultValueExpressionโ part of INPUT() doesenโt really do that in my testing. (I cannot make that do anything)
Anyone knows how to get the wanted initial value in INPUT()?
Yes. Please look at my tip:
Thereโs are instructions there and a sample app you can play around with.
I got an error, I canโt press save.
Is there any solution?,help me!
Thanks!
I assume you are posting here because this has something to do with the new INPUT() function. If so, could you provide more detail? I wonder if INPUT() and direct editing are interfering with each other in some way.
ฤรขy lร hร nh ฤแปng cแปงa tรดi vแปi hร m input()
Your INPUT() formulas are empty. I think the second half can be empty but that you need to have something in the first half. Perhaps something like this:
INPUT("DUYET","")
Please see my tip for a sample app that works. You can try playing around with expression in my sample. That might help you fix the problem.
Thanks!
Tรดi cลฉng cรณ mแปt แปฉng dแปฅng khรกc sแปญ dแปฅng input("","") nhฦฐng chรบng hoแบกt ฤแปng bรฌnh thฦฐแปng!
Google translate: โI also have another app that uses input(โ","") but they work fine!!"
Interesting. I think, though, that the first half is a name of the function. In your example you are trying to use it in two different columns. If they are different values I think you need to have different names in the input expression.
Syntax
INPUT( inputName, defaultValueExpression )
ArgumentsinputName (Text): Any input name that is unique within the context where it is used.
defaultValueExpression (any type): the default value that should be associated with this expression.
Cแบฃm ฦกn bแบกn nhiแปu!
Tรดi ฤรฃ thแปญ nhฦฐ bแบกn nรณi nhฦฐng vแบซn khรดng lฦฐu ฤฦฐแปฃc.
Tรดi ฤรฃ gแปญi email nhแป hแป trแปฃ tแปซ Appsheets nhฦฐng chฦฐa cรณ kแบฟt quแบฃ.
โThank you so much!
I tried as you said but still canโt save.
I have emailed support from AppSheet to no avail.โ
Hmmmm. support@appsheet.com is usually very good. I wonder what the problem is.
Does INPUT() only work with text or number field types? I am trying to use it with a Ref field type, but so far no luck.
Works with REF as well. Works fine hereโฆ
Tรดi ฤรฃ thแปญ nhiแปm thรฌ phรกt hiแปn nhฦฐ sau:
1,Cรกc bแบฃng khรกc sแปญ dแปฅng chแปฉc nฤng input() hoร n toร n bรฌnh thฦฐแปng.
2,Khi tรดi xรณa cรกc cแปt cแปงa bแบฃng dแปฏ liแปu xuแปng tแปซ 65 cแปt xuแปng 12 cแปt thรฌ chแปฉc nฤng input() ฤรฃ hoแบกt ฤแปng?
Tรดi khรดng hiแปu,mong mแปi ngฦฐแปi sแบฝ tรฌm ra lแปi sแปm giรบp tรดi.
Cแบฃm ฦกn!
How to reset a column value when using INPUT()?
Iโm in a detail view and created an action to change the value of a column. The input form pops up and I can change the value. But I want the column to be blank.
I tried โReset on Editโ with CONTEXT(โViewโ)=โMy_Detail_Viewโ). I even enabled โReset on editโ without an expression. But this will not reset the column in an INPUT() window.
Reset the value would be very useful if you have 2 or more columns with Dependent Dropdown: Changing the first column should blank the next column.
@praveen Could we get an own CONTEXT() for Input()? Like CONTEXT("ViewType"="Input")
.
If the Form View is with Page Style โTabsโ, then also the Input View will have multiple pages.
Even when you have just one column to edit with INPUT().
@praveen I have a question about your example in the help article.
In the Action โSetQuantityโ I would like to add another column with INPUT(). For example โColorโ.
So in the LineItems Detail view I can change the Quantity and the Color via the INPUT() Action.
But in the โParentโ Action I donโt like to involve this Color column.
It should change the Quantity, but should leave the Color as it is.
How can we do that?
I tried different Versions of IF() and IFS() and CONTEXT().
Hi Fabian, so you want to bind one input but not the other? For the Color column, you want to tell it to โjust use the defaultโ? Hmm. On the backend, it works this way because there is no user to ask. But on the front-end, if there is an INPUT that isnโt bound, then we assume you intend to ask the user.
Hi @praveen yes thatโs exactly what I want to do.
If CONTEXT() would work for INPUT() then I could do it. I would say โshow the Color column only when Iโm in the LineItem view, but not when Iโm in the parent viewโ.
I would be able to delete like 6 extra tables and forms an app with this.
Hello, I try to do INPUT Box
but the result is in this picture below
whatโs wrong with it please tell me how to improve that ^^
Thank you
I found today that you cannot do this:
In other words, you canโt build an expression where the output of INPUT() is used in any way besides directly writing into a column. In this use-case, you cannot add the entered value to the current value.
Iโm hoping that this functionality will be available in the future.
Sadness
Why canโt INPUT() simply work as an expression in Action: Add a new row in another table using values from this row?
In the example of @Rifadm817 , the workaround is to add that row first, then execute an action that sets the column of the newly added row using an Input.
That means you will need to create 4 actions:
All these unnecessary actions will be eliminated if Input simply works in Action 1.1.
Also not ideal, as if the user clicks โCancelโ in the Input Form pop-up, the first action of adding the new rows has already finished although the user thought he canceled the entire action.
@praveen Any particular reason why we canโt we pop up the Input() before adding the new row?
Why do we have to add the row first, then open that row, and update the values using the Input()?
I have encountered the following:
I have a Annual Report table with up to 12 child items stored in the Water Use table.
Both tables have a reference field to the Meter Information table.
I have an automation task that if the MeterInformation ref in the Annual Report table changes, then this task also changes the MeterInformation ref in the Water Use table.
I have introduced an action to the Annual Report table of type change a value with the INPUT function so that I could ideally change the MeterInformation ref for multiple Annual Reports and thereby concurrently change the MeterInformation ref on the related Water Use records.
The first report I executed this action on went flawless, however the next successive tries when I click the save button on the INPUT dialog nothing appears to happen. The dialog unfortunately stays open and I cannot tell if the application is attempting to sync but is running into any problems. There also is nothing in the Audit Log indicating that the change occurred in the Annual Report table and then initiating the change automation.
Any help would be appreciated.