Solved

Make records readonly based on status value

  • 1 July 2021
  • 1 reply
  • 28 views

Userlevel 2
Badge +5

I've table with 60+ fields and some related tables (parent-child relation). 
Based on a status in the header table, the record in that table and the related records in the child tables should be made readonly in a layout procedure.

Is there option to make this in a ‘simple’ part of code without specifying all the fields separately?
Otherwise there is a risk when adding new fields, that these will be missed to make them also readonly.

Is this possible with dynamic model?

 

Thanks in advance!

icon

Best answer by Mark Jongeling 1 July 2021, 09:21

View original

1 reply

Userlevel 7
Badge +23

Hi,

The Dynamic model is more for Model objects like adding Tasks, References, Tables and Columns. 

You can make a Layout that applies to certain tables and columns based on the status column of a certain table. Create a SQL-typed Layout control procedure, add program object items for every table that needs this layout and add program object item parameters for every parameter in your template(s).

A parameter to dynamically assign a column is needed, for example [COL]. This "tag” you then can translate to the correct col_id.

This is not going to be a very easy control procedure but will certainly relieve you from a lot of trouble:wink: It's not so easy to help you with this through a Reply box on the Community but I hope I gave you some info to make it happen. You can find some other SQL-typed control procedures (possibly generated ones) for some inspiration.

 

Reply