IMSMA3 script writing: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
Created page with "{{Note | Changes to scripts in 6.0 are outlined in Script changes 6.0.}} {{NavBox Hub}} Category:NoPublic Category:NAA"
 
No edit summary
Line 1: Line 1:
{{Note | Changes to scripts in 6.0 are outlined in [[Script changes 6.0]].}}
{{Note | Changes to scripts in 6.0 are outlined in [[Script changes 6.0]].}}
{{TOC right}}
==Workarounds==__NOEDITSECTION__
{{Warning | ICR-114: The update query in [[Multi-select CDFs]] needs to be added as a ''Data.RunSQLStatement'' if any of the fields that are imported are multi-select.}}
==Approval information is not set==__NOEDITSECTION__
The approval function was changed in 5.08.02 and ''Approved by'' and ''Approved date'' needs to be set in the script in Pojo '''Fieldreport'''.
<pre>
Attribute.SetDate("ReportVerifiedDate", Data.CurrentDate());
Attribute.SetString("VerifiedBy", "migration");
</pre>
==ID number gets decimals==__NOEDITSECTION__
Especially when using Excel as indata it is common that item ID becomes e.g. Assistance-10.0 which is fixed with 2 Cast.<br>
<pre>
Attribute.SetString("LocalId", "Assistance-" & Cast.String(Cast.Int(Row.GetAttribute("ID"))));
</pre>
==Limitations==__NOEDITSECTION__
Unfortunately it is still not possible to use the following in scripts:
* greater than (>)
* less than (<)
* LIKE (e.g. Eriks* or Eriks%)
{{NavBox Hub}}
{{NavBox Hub}}
[[Category:NoPublic]]
[[Category:NoPublic]]
[[Category:NAA]]
[[Category:NAA]]

Revision as of 15:43, 21 January 2015

Changes to scripts in 6.0 are outlined in Script changes 6.0.

Workarounds

ICR-114: The update query in Multi-select CDFs needs to be added as a Data.RunSQLStatement if any of the fields that are imported are multi-select.

Approval information is not set

The approval function was changed in 5.08.02 and Approved by and Approved date needs to be set in the script in Pojo Fieldreport.

Attribute.SetDate("ReportVerifiedDate", Data.CurrentDate());
Attribute.SetString("VerifiedBy", "migration");

ID number gets decimals

Especially when using Excel as indata it is common that item ID becomes e.g. Assistance-10.0 which is fixed with 2 Cast.

Attribute.SetString("LocalId", "Assistance-" & Cast.String(Cast.Int(Row.GetAttribute("ID"))));


Limitations

Unfortunately it is still not possible to use the following in scripts:

  • greater than (>)
  • less than (<)
  • LIKE (e.g. Eriks* or Eriks%)

Template:NavBox Hub