Skip to main content

Hi there,

I couldn't find any specific documentation on this — or perhaps I may have overlooked it — but I’d like to confirm if the following is possible.

We have a reference setup:

 @ref_table1_table2

In the GUI, this results in:

TABLE 1 - Detail tab - TABLE 2

In this setup, we want to keep TABLE 2 read-only until a specific task on TABLE 1 is triggered, which then inserts data into TABLE 2.

Is it possible to implement this behavior within the Software Factory without resorting to dynamic code?

Kind regards,
Balazs Szeder

Hi Balazs,

This is currently not possible without the use of Context logic, so you will have to resort to code for that. An existing idea can be voted on: 

Building that control procedure dynamically using SQL is certainly an option if the situation occurs multiple times in your application and there is a common property between those. 

The Context procedure can verify the existence of data in the target table, and if there is no data (yet), then it can disable the Detail tab until there is.

In IAM, we also disable screens if there is no data. The template looks like this:

if not exists (select 1
from oTARGET_TAB] r
where r.model_id = @model_id
and r.branch_id = @branch_id
and r. TARGET_COL] = @=SOURCE_COL]
)
begin
set @tREF]_type = 1;
end;

The Control procedure code will supply the values that the Deploy step will use to replace the parameters inside the brackets. If you want to know more about this, I have written a blog about it here: 

You can also use tags to tag the source and/or target table, or tag the reference that should be included in this control procedure:

Hope this helps!


Reply