Skip to main content
Solved

Add button disabled in detail linked to view

  • January 20, 2023
  • 1 reply
  • 74 views

Forum|alt.badge.img+6

Due to performance reasons, we have created some views on top of some main tables and linked them to the original table.

From the grid (view) we show in the detail screen the form of the table itself.
But then the add button is disabled.
For the table itself the Add options are enabled in the subject settings.

Also in the layout procedure we don't manipulate the @add_button_type and it is parsed with value 0
I think this is because of the 1:1 relation between the gridview and the table itself.

How to enable the default Add button?


 

Best answer by Anne Buit

When you would add a record to the view, the UI would not know how to navigate to the newly added record. It does not know that the record in the view and the parent table are logically the same entity.

You can circumvent this but it is a bity tricky.

First, you’ll need to trick the UI into thinking it is not a 1:1 relationship. You can do this by adding an arbitrary primary key column to the view, e.g. extra_id with value 1 and default value 1.

Now, you will be able to add records but when you add a record it will disappear with a message saying that the added row cannot be found.

You can resolve this using a process flow that navigates the parent table to the newly added row.

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

1 reply

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 637 replies
  • Answer
  • January 23, 2023

When you would add a record to the view, the UI would not know how to navigate to the newly added record. It does not know that the record in the view and the parent table are logically the same entity.

You can circumvent this but it is a bity tricky.

First, you’ll need to trick the UI into thinking it is not a 1:1 relationship. You can do this by adding an arbitrary primary key column to the view, e.g. extra_id with value 1 and default value 1.

Now, you will be able to add records but when you add a record it will disappear with a message saying that the added row cannot be found.

You can resolve this using a process flow that navigates the parent table to the newly added row.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings