Cancel Default Form Submission

Hi

I have a form screen. And in my data I added a few math and if then else columns.
I made a custom Add Row Action to use these math columns instead of real data.


In the above screenshot. I want the form to submit the calculated Amount (CalcAmount) into the Amount column.
The logic is as follows.
The user types in an amount (ABS Amount), and has a switch boolean IN/OUT which defaults to true (meaning OUT). This means the value in the input needs to be negative.
I take the ABS Amount, and if OUT == true I set the value to negative.
In my custom action I then take the calcAmount and insert it into the column Amount. So it is visible on the screen.
But the forms screen always adds a line before it without the Amount calculated.
I believe this is the default submit. Is there any way to turn it off?

There is no way to prevent a native add form from adding a row on submit.
To make what you are trying to do work, you will need to use a Custom Form.

2 Likes

This causes another problem.
I have a list of categories and types in 1 spreadsheet.
I list the categories in an inline list, when clicked the detail windows for that list pops up, and in that detail window I have the list of types connected to the clicked category.
When I click the type, I want the add screen to pop up.
Current flow was:
inline list in homescreen > inline list in detail screen > form screen for adding payment.
If I change the detail flow to a custom form, I can no longer make the subdivision between categories and types without moving the types to a different spreadsheet.
Is there a way you see without completely overhauling my dataset?

This dataset depends on a lot of scripts in the back-end to automate my family’s finances :slight_smile:
I kind of don’t want to ruin those.

Why would a custom form mess up the flow? Instead of an action to Show Form, you set the action to Show New Screen.

Oh. But I didn’t find a way to know which item was clicked to show this screen. If this can be done. I have my solution!

Edit: Some more info. i click on a list linked to my budget sheet. If I click the first item I then show a screen linked to my payments screen, I get the first item data from the payments screen. Not the data I just clicked.

Edit2: Found it. I have to make a new screen for the budget spreadsheet (Here I chose payments before) , and then make the form for the payments and choose the payments spreadsheet as my destination in the action itself.

Edit3: Ultimately this isn’t working. The data I am getting is just always the first row of my spreadsheet, not the data I clicked in the previous screen.

If the action is Show New Screen for the item you clicked, make sure you select ‘This Item’ instead of the table. That will keep you in the same row you selected.

3 Likes

Mister Jeff. You just made my day. It works.

1 Like