Based on a post by @Joachim_Mund โฆ
โฆ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
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.
Run the app, open the row and tap the action button OR edit the row and Save.
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?
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.
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.
0 voters
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:
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
Hi @Marc_Dillon
I know you are a very helpful person and personally I have already seen your posts there and, as I said:
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
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
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.
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
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.