However I’d like to make a custom button that can not only make a row like the form above, but also write to a new row in a different table based on if the user selects that option in the form. But when I make a new screen (instead of a form screen), the inputs are pre-populated.
First, is this possible? One form writing to two tables? I thought I read it somewhere on the forums. Second, why is this the new screen with the form components pre-populated? How can I start with empty fields?
Thank you. I did read through this, and I think I need to create a custom form and blank out the values. However when I use a custom form and the existing values are edited, it obviously updates the record which I don’t want. That’s why I like the form screen.
But I’m wondering if an if-then-else can somehow be used on the submit button of a form screen?
I can create custom actions to write to 2 different tables, but I only want to write to the second table if the user makes a certain selection.
If you look carefully through that thread, you’ll notice that that entry components are written to temporary user specific columns. Once you “submit” the form, you call an Add Row action that will write those temporary values to whichever table you want. You need to create those temporary user specific columns and point your entry components to them instead of of the columns that contain existing data.
And yes, your idea for a custom action on the submit button should work.
I agree with @Eric_Penn. I’ve done it several different ways. Columns in an existing table or columns in a separate table. But giving the form it’s own work table is a little cleaner. I’ve done a lot of “work” tables, which are just tables with a set number of rows used to perform a particular function rather than storing data.
The reason I asked was because if your Show New Screen is targeting a different table from the current table, then as soon as that action fires the context changes. This could be why the subsequent Set Columns fails.
Have you tried reversing the actions? ie. Set Columns first?