Hello Cloud Community,
I have a strange use case I can't find an answer for anywhere. I have a table in AppSheet sourced from a Google Sheet. In this table, the data in the rows is not relevant to columns other than the column the data is in. Some columns will have 100+ rows of data while another column may only have 10 rows of data. As such, I would like to treat each column as its' own independent table. When I make slices of each column the view perfectly suits my need, however, when I Add (+) new data the form posts to the next empty row of the table, not the column. I'm aware this is by design and I'm trying to use AppSheet in a non-standard way. Is there a way to make the Add button in a slice default to the first empty row of a specific column? Is there a better way to do this? Currently, I've split my columns into many separate Sheets to get the functionality I need, but this is getting unmanageable on the Sheets side of things as I have more than a few tables that need to be split this way. My Workbook has way too many tabs.
TLDR; Is there a way to make the Add button in a slice default to the first empty row of a specific column instead of the first empty row of the table?
Do you mean the "Add" button should actually be an update instead of add as you are trying to add the value to a row that already exists?
In a matter of speaking, yes. Auto save and Auto re-open are required for countinuous data entry from a source outside the app, since they both use the same form that would work fine. If there was a way to open the Update form for the next available ISBLANK() using a Primary view Action button that woul be great, but I couldn't find one in the Actions.
Have you tried to use LINKTOROW()? That should work.
Based on your suggestions and insight into using Update instead of Add I was able to find a solution by using LINKTOFORM().
Action:
Do this - APP: Go to another view within this app
Target - LINKTOFORM(concatenate(context("View"),"Update"),context("View"), (301-COUNT(FILTER("Harvest",AND(ISBLANK(context("View")),ISNOTBLANK([Row]))))))
Form View:
Row key - (301-COUNT(FILTER("Harvest",AND(ISBLANK([WW]),ISNOTBLANK([Row])))))
This solved my fuctionality problem of being able to treat the columns independently, however, new issues popped up. My biggest current problem is the Auto re-open fuction, instead of re-openning the form when the Update is saved, it just goes back to the Slice View. Does Auto re-open only apply to New lines? The description "Automatically re-open the form after saving." suggests that it shouldn't mater if its and Update, Edit or Add. The second issue is that the Advance forms automatically option no longer places the cursor in the first text box when the form opens (it did so when I was Adding new lines to the Table originally). These functions are integral to the operation of my App. Any Help would be greatly appreciated.
You could try to trigger an action to open another row with the "Even action" on the form view.
I've removed Add from the Table entirely and I'm using only Update, that said I used this advice to make a new Form targetted at the next row relative to the current Form, then used the Even action to open it. Which, of course, presented a new problem.
"Local changes have not been synced. Proceed anyway?"
If I choose Yes, the App crashes.
"The true app did not load successfully.Please contact the app creator.
Network error. Please check connectivity and try again"
If I choose No it works properly.
Is there a way to disable this error message and default it to No? Or is there a way to delay the Form from opening, giving the App time to sync? Or force the sync to happen before the Form opens?
I've come so far with this that I don't want to give up, but I'm starting to regret my choice, maybe I should have stuck with the spreadsheet that had too many tabs.
I made a quick test with a suitable action + the Event action, and for me it works fine. The action has a deep link as..
LINKTOROW(MINROW("Data","_ROWNUMBER",ISBLANK([ColA])),"Data_Form")
And if you want that it jumps to the next column when the first (not full filled) column is done, use something like this with the action..
IFS(
COUNT(SELECT(Data[ColA],ISBLANK([ColA])))>0,
LINKTOROW(MINROW("Data","_ROWNUMBER",ISBLANK([ColA])),"Data_Form"),
COUNT(SELECT(Data[ColB],ISBLANK([ColB])))>0,
LINKTOROW(MINROW("Data","_ROWNUMBER",ISBLANK([ColB])),"Data_Form"),
TRUE,
LINKTOVIEW("Data")
)
User | Count |
---|---|
15 | |
11 | |
10 | |
8 | |
3 |