Help: Creating a new row from a Custom screen

Hello all !

I do not seem to find a solution to quite a basic stuff.

OK, i have a table of events Events
It is possible to create an event from a screen.
The problem with built-in forms is that they are permanenty get corrupted as I add changes to the table, so I opted to create a custom CreateEvent screen.

The only clean way I see to create an event via this screen is via setting up a workflow.
So

At the main screen linked to the Events, i direct Add button to the AddEventWorkflow.

My idea for workflow:

  • Add new event row
  • call the CreateEvent custom screen for this new row
  • let user fill the form
  • on actions Add - just add some internal values and go to Main screen ; on Cancel - delete this row

My problem:
This workflow starts always with picking a context row - the first row in Event table.
Even when I add a new row the current row in not the new one.
How can I access i?

Thank you for your help to a glide newbie ))
Diana

Ultimately you should only be adding a row when you click the add button. The Cancel button should do nothing more the just go back or go to a particular screen. You will never be able to rely on a user to click on the cancel button when in reality they could just as easily click on the browser back button and avoid your buttons altogether. In that case you could end up with several incomplete entries or empty rows.

Custom forms work better if they rely on a completely separate helper table that is separate from the table that stores the submissions. The helper table is a single row table with user specific columns to hold user entries until the form is submitted. It’s best to clear the form fields when navigate into the form.

Custom forms have their place when you have complicated requirements, but how are your native forms being corrupted? Native forms are much easier to manage and setup than custom forms, but I’m curious what kind of table changes are causing issues for you and what’s happening. I’ve never had a native form get irreversably “corrupt”, so if like to understand what’s happening.

2 Likes

Thank you for answering

I design a form with

  • field names in human language - not just technical field names
  • I add some text explanations
  • some fields appear depending on previously selected choices in this form
  • finally before built-in Add actions I was adding some technical values to the row

But several times I have this form reset to the technical input. I am still developing so I do naturally change fields in the table. ChatGPT says this is the problem. So I look a way to overcome reediting this form

here are two pics to show what I want and what I get all the time (the MVP is for russian-speaking sorry)


Ih there is a way to keep this form stable - I am taker.
I not, I must find another solution.

thank you for any feedack and ideas )

Diana

This should only happen if you change something on the underlying screen that would cause the native form to be thrown away, while presenting you with a brand new form. The type of changes that would cause that usually involve removing a button or action that opens the form, removing a component that calls the form action, or changing the source of a screen or collection. Forms just don’t break on their own. I’m guessing you are doing something that would cause the entire Form action to be removed or replaced with a new form.

That said, If you still want to use a native form to make things easier than using a custom form, you can create a workflow that simply opens a native form. It will be a lot less likely to get lost, and you can call if from multiple places in your app.

2 Likes

Just to close the topic after a consultation with an expert.

This may save some time for someone

The built-in Form Screens are very fragile during the development time - any change in related table or actions - they get reset to a raw format.

To improve development efficiency - just create a hidden MasterInput screen with your required visuals and logic. Whenever the form is reset you can copy/paste your master form. Still check the logic - apparently errors may slide in during copying

It is impossible to change the row in the actual context as I needed in the workflow.

Regards,
D

1 Like