Change to "Target section" property
The Target section property has been changed to correct a bug. This may affect existing Run on click IQL configurations. This page is meant to help you understand if you are affected and what actions you can take.
What was changed?
When using the Target section property, Run on click configurations can now read field values from the target section. Previously, it read field values from the component’s section (parent section) instead.
For example:
if Salary < 0 then
set Salary = 0
end
call save()
Would not work as expected, because the field "Salary" could not be read in the if-clause. It instead tried to read the field value from the parent section, regardless of whether it belonged to the correct table.
Why was it changed?
For most people, it was not intuitive that setting a field value and reading a field value used different records. It was especially confusing if you tried to use certain actions, such as generating a report or opening a form, where it would fail to use the target record.
Furthermore, the IQL editor for Run on click did not reflect the discrepancy, and would instead suggest the wrong list of fields if the parent section had a different table.
Compatibility mode
If you are reading this page, there’s a good chance you saw this on top of your IQL:
-- use_target_section_compatibility_mode -- Please see https://docs.istools.com/istools/latest/target_section_migration_guide.html
When this comment is present at the top of the IQL, the system uses the old behavior. Compatibility mode should be considered deprecated and will be removed in the future, but it provides an opportunity to reconfigure affected forms.
How can I tell if I’m affected?
The above directive has been automatically added to places where an action component is placed in one section but uses another as a target section. But the configuration is only affected if you access field or pseudo field data - explicitly or implicitly.
Examples of affected statements
set RelationField = Recordname (1)
if Field is null then ... end (2)
call openForm("My form") (3)
call runReport(10083) (4)
| 1 | Reads the record name from the parent section |
| 2 | Reads the field value in the condition |
| 3 | Reads the record id from the parent section to select it in the target form |
| 4 | Reads the record id from the parent section and uses that in Run report dialog. The same goes for all report actions. |
Examples of unaffected statements
set Salary = 0 (1)
call save() (2)
call create() (2)
call delete() (2)
| 1 | OK - doesn’t read any data |
| 2 | These actions don’t read any data |
The most practical way is to remove use_target_section_compatibility_mode and test the configuration. If something changes, you can either add the comment again or try to fix the issue.
Use "Find in form" with "All forms" checked and search for use_target_section_compatibility_mode to find all affected configurations.
|