CRUD on VIEW / Send row to form call to action on query mode


To add/edit/delete in a V2 FORM, you need two things :

  • Your model has to be a TABLE MODEL
  • Your model require a primary key

A View can be configured has a TABLE, but it will not have primary key, so we will set one.

In order to do this, if you have access to document ‘Form monitoring’, you will have to get the grid item uuid of the FORM.

For this, use the inspector of your navigator (F12) then find the grid-item form and pick its uuid.

You will have to enter it into the input of Form monitoring, find your PRIMARY KEY in the different field and check the case ‘Is Primary Key’ on its row.

If you don’t have access to this report, you can do it with a SQL query :

UPDATE ii_app.p4it_atelier_form_header headers
SET is_primary_key = TRUE 
WHERE grid_item_id = '92eb91a0-ea09-11eb-b967-0242ac130007' -- REPLACE BY YOUR FORM UUID
AND field_name = 'id'

You will now be able to INSERT/UPDATE/DELETE on your FORM. To process the transaction, you will require rules on your VIEW that will accept the data send.

It is possible to link Automation after CRUD on a view, like an usual CRUD in a form.

Send row to form call to action on query mode :

On a form that has a QUERY MODEL, to run action with the values of the current line (use case : an icon [+] to add something to the current entity => you need its ID) you will need a unicity on a column of your query (like primary key).

You will have to go on the configuration of the primary key column, in Control panel, you have to check Is Primary Key (and uncheck Is displayed if you do not want to see it) and save the configuration.

By doing this, when you will call a stored procedure

PERFORM ii_dwh.sp_ii_core_log(p_current_user_name, 10, var_current_object_name, null, p_context_input);


1 Like

Wouldn’t it make sense for this to be directly integrated in the UI?