Did you know....that there IS a pop-up Form available using the INPUT() function?

Based on a post by @Joachim_Mund

[Help needed: in an action, how to ask the user to enter some text via input()](https://community.appsheet.com/t/help-needed-in-an-action-how-to-ask-the-user-to-enter-some-text-via-input/54947) Questions

Hi all, from a card view I give a user the possibility to decline something. This trigger an action “Data: set the values of some columns in this row”. One of the columns to be set should prompt the user for some text via input(“Ablehnungstext”, “”) But the input box is empty and no input field is shown. What I’m doing wrong? Thank you for all help!

…I just learned that there is a way to present a pop-up Form to collect additional input from a user. It is with the INPUT() function.

I never knew this existed and I don’t ever recall it talked about in any of the posts I’ve read (I don’t read everything ). I thought there is probably a good chance others weren’t aware of it either so I thought I’d pass it along.

Basic Usage

  1. Create a “Set the values” action specifying the target field. Other field updates can be included. You can even specify multiple fields with an INPUT() function and they will all be shown on the Input pop-up Form.

  1. Set the action as a button (Display Prominently) or attach it on Form Saved, etc. I’ll let you explore other places it might can be used.

  2. Run the app, open the row and tap the action button OR edit the row and Save.

  3. The Input Form will open similar to the image below. Notice that the default values specified in the INPUT() function implementation are not set. Otherwise the columns take on their normal Form behavior.

If the columns values have been previously set, those values will be populated in the pop-up Form.

That’s it! How many others didn’t know this existed?

12 Likes

For reference:

[New INPUT() function --- binding dynamic inputs to a data change action](https://community.appsheet.com/t/new-input-function-binding-dynamic-inputs-to-a-data-change-action/50812) Announcements

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: Action: UPDATE EXISTING ROW(s) using values from this row with 92 votes, the top-voted feature request here in the user com…

[Using INPUT() to update another table using a value from this row](https://community.appsheet.com/t/using-input-to-update-another-table-using-a-value-from-this-row/51195) Tips & Tricks ?

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: https://www.appsheet.com/samples?appGuidString=502cc394-2717-4a69-8246-5fc26a1aa9cf This extremely simple app has two tables: one with multiple records and one with only one record. The i…

11 Likes

Did you know about the INPUT() function

  • I saw the announcement
  • I heard about it elsewhere
  • News to me!

0 voters

8 Likes

Hi @WillowMobileSystems Thank you for taking time to post this.
I also don’t read everything in the community. But I saw that it’s good to read everything in:

  • Tips & Tricks
  • Feature Release Notes
  • Announcements
6 Likes

Marc_Dillon:

For reference:

Wow! I was extremely busy in July and not on AppSheet much. I guess that announcement was something I scanned and didn’t commit to memory. I found the doc on it posted by Praveen and just assumed it was an old thing. I should have searched for other postings first.

I am so sorry for wasting all of your valuable time!

I do have questions but will post in the questions area.

3 Likes

WillowMobileSystems:

I am so sorry for wasting all of your valuable time!

Not a waste at all! This was a good tip post on the basic usage of INPUT() for the pop-ups. The other tip post by Kirk that I linked was more about the ability to use INPUT() to pass values through a reference action. Good to have both.

7 Likes

THANKS!!!

Have anyone experienced that when you want to save the pop-up it just doesn’t?
I checked and there are no problems with the whole row.
Maybe it’s related to the fact that I’m using it on a slice?
I need this for a client and I have just 2 weeks to go

New INPUT() function — binding dynamic inputs to a data change action Announcements

Hello friends, i’m trying to use the input() function in a very simple way, but i can’t get the popup to save, this is my current configuration, i’m hoping to use input() as a way to add comments to rows directly from a dynamic dashboard by using an inline action. [image] INPUT(“Comentario”,TEXT(“”))

1 Like

Hi @Marc_Dillon
I know you are a very helpful person and personally I have already seen your posts there and, as I said:

SkrOYC:

I checked and there are no problems with the whole row.

That means that a “normal” form saves without problems.
I suspect that even when I’m asking the action that pops the Input form from a slice, it keeps taking into account the whole row (including all the columns/fields) instead of just the ones from the slice.
It may be touching into a bug or just some niche case where Input is just not the solution I need.

PS: BTW, I need it from a slice because I’m using a big table with slices in order to have one-to-one. Hope AppSheet will include 1-1 by default on the future

PS2: It would be nice something like “have you read this? link” instead of just posting asuming someone haven’t done any research yet, just to be gentle with anyone on the community

SkrOYC:

I suspect that even when I’m asking the action that pops the Input form from a slice, it keeps taking into account the whole row (including all the columns/fields) instead of just the ones from the slice.

If you have any required fields that are not included in the slice then 100% AppSheet won’t let you save a row without them, you need to make sure whatever you save once you open your INPUT() window is valid to be saved as a normal row, and remember that it starts as a new row, which is completely empty.

Maybe read up my post that @Marc_Dillon linked for inspiration? I had a similar issue not so long ago

2 Likes

Rafael_ANEIC-PY:

If you have any required fields that are not included in the slice then 100% AppSheet won’t let you save a row without them

Since Actions are where the INPUT function is used and Actions DO NOT operate on slices as a datasource, the INPUT function processing MUST be considered against the base table. This means that any App Formulas, Required fields, Non-Editable fields,etc across the entire row all need to be considered when using the INPUT function.

4 Likes

Thanks!. Also thank you @Rafael_ANEIC-PY
I actually have read all the posts on the topic @Marc_Dillon have mentioned, but I had a doubt that @WillowMobileSystems confirms.
Since Action can’t be made against a Slice instead of a Table, the action will always be made against the table. This won’t change until AppSheet makes actions for slices (If there is a valid reason for that).
Well, I’ll be making multiple forms to solve my problem with our client.
Also, lately I’ve been struggling a lot with all the default behaviours that AppSheet has as a platform, since I think is very user friendly but can be a problem when you are making a more ‘advance’ app. Basically, I’m working on making manual actions and views to replace any system-created stuff. I think I’m gonna make a Tips and Tricks topic in the comming weeks if I succed with all of that (and if I don’t find anything in the community talking about the same thing). Basically, from “automatic sytem-created” to a “full DIY”.

Really hope Input() will be even more usefull in the future, maybe controlling it’s UX side manually

2 Likes

If there is anyone with this problem, I will point you to my workaround.
I did a lot of forms and created actions that linked to filtered views but then I realize that this problem/bug were INPUT() checks all the valid_if and require_if statments even though the fields are not included in the INPUT() mini form could be fixed changing the valid_if and require_if to just work when the CONTEXT(VIEW) is a full form.
In my case, were just the required fields that didn’t allowed me to save the pop-up form from INPUT() so I changed the Requite? to a Require_If expression:

SWITCH(
  CONTEXT(VIEW),
  "DIM_SDUS_Detail", 0=1,
  "DIM_SDUS_Dash Menu", 0=1,
  0=0
)

Obviously, there are always many ways to do a thing inside AppSheet.
In my case, I’m marking it require just if the view is not the Detail and Dashboard mentioned above. I could have done it like this also:

CONTEXT(VIEW)="DIM_SDUS_Form"

or something like that, but I prefered the “leave this views out” instead of the “just consider these ones” approach.
Hope this helps someone. I’m thinking about to post this as a Tip

BTW: I use logic instead of false or true because I’ve found that unreliable on YN columns were the spreadsheets are not in English and eventhough this is not a YN column I’m more use to those mini logic expressions (0=0; 0<>0; 0=1…) instead of the false/true stuff.

2 Likes