IMSMA3 script writing: Difference between revisions

From IMSMA Wiki
Jump to navigation Jump to search
No edit summary
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]]. In the [[Data Dictionary]] you will find the target field names that should be used in the scripts in the column ''Pojo name''. We also have more documentation than provided in ''C:\IMSMAng\migration\doc'', training material from several GICHD IM trainings and the one script training provided in Afghanistan.}}
{{TOC right}}
{{TOC right}}
==Approval information is not set==__NOEDITSECTION__  
==Approval information is not set==__NOEDITSECTION__  
Line 15: Line 15:
</pre>
</pre>
   
   
==Limitations==__NOEDITSECTION__  
==Limitations==__NOEDITSECTION__  
Unfortunately it is still not possible to use the following in scripts:  
Unfortunately it is still not possible to use the following in scripts:  
Line 21: Line 20:
* less than (<)
* less than (<)
* LIKE (e.g. Eriks* or Eriks%)
* LIKE (e.g. Eriks* or Eriks%)
==Approval functions==__NOEDITSECTION__
{| class="wikitable"
! Function !! Generation !! wiki reference !! Comment
|-
| ApproveAsCombine || 5.x || [[Reconcile started from Data Entry Menu]] ||
|-
| ApproveAsDelete || 6.0 || [[Delete from the Summary Window]] ||
|-
| ApproveAsEdit || 6.0 || [[Update the Data in the Summary Window]] || Not suitable for scripts if you will not update '''all''' fields of the item
|-
| ApproveAsNew || 5.x || [[Reconcile as New]] ||
|-
| ApproveAsReplace || 5.x || [[Reconcile started from Data Entry Menu]] ||
|-
| ApproveAsUpdate || 5.x || [[Reconcile started from Data Entry Menu]] || Combine '''or''' Replace depending on parameter
|-
| ApproveAsUpdateBase || ??? ||  ||
|-
| ApproveLocationAsNew || 6.0 || [[Script changes 6.0#Location|Location]] ||
|-
| ReconcileAsDelete || 6.0 || Same as above but DEF will be found in the Workbench ||
|-
| ReconcileAsEdit || 6.0 || Same as above but DEF will be found in the Workbench || Not suitable for scripts if you will not update '''all''' fields of the item
|-
| ReconcileAsNew || 5.x || Same as above but DEF will be found in the Workbench ||
|-
| ReconcileAsUpdate || 5.x || Same as above but DEF will be found in the Workbench || Combine '''or''' Replace depending on parameter
|-
| ReconcileAsUpdateBase || ??? ||  ||
|-
| ReconcileLocationAsNew || 6.0 || Same as above but will be found in the Workbench ||
|}
Do NOT use:
ApproveAndLinkVictim
ApproveHazardReductionAsProgress


{{NavBox Hub}}
{{NavBox Hub}}
[[Category:NoPublic]]
[[Category:NoPublic]]
[[Category:NAA]]
[[Category:NAA]]

Revision as of 05:35, 2 May 2016

Changes to scripts in 6.0 are outlined in Script changes 6.0. In the Data Dictionary you will find the target field names that should be used in the scripts in the column Pojo name. We also have more documentation than provided in C:\IMSMAng\migration\doc, training material from several GICHD IM trainings and the one script training provided in Afghanistan.

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");

The different dates in the table fieldreport are explained here.

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%)

Approval functions

Function Generation wiki reference Comment
ApproveAsCombine 5.x Reconcile started from Data Entry Menu
ApproveAsDelete 6.0 Delete from the Summary Window
ApproveAsEdit 6.0 Update the Data in the Summary Window Not suitable for scripts if you will not update all fields of the item
ApproveAsNew 5.x Reconcile as New
ApproveAsReplace 5.x Reconcile started from Data Entry Menu
ApproveAsUpdate 5.x Reconcile started from Data Entry Menu Combine or Replace depending on parameter
ApproveAsUpdateBase ???
ApproveLocationAsNew 6.0 Location
ReconcileAsDelete 6.0 Same as above but DEF will be found in the Workbench
ReconcileAsEdit 6.0 Same as above but DEF will be found in the Workbench Not suitable for scripts if you will not update all fields of the item
ReconcileAsNew 5.x Same as above but DEF will be found in the Workbench
ReconcileAsUpdate 5.x Same as above but DEF will be found in the Workbench Combine or Replace depending on parameter
ReconcileAsUpdateBase ???
ReconcileLocationAsNew 6.0 Same as above but will be found in the Workbench


Do NOT use: ApproveAndLinkVictim ApproveHazardReductionAsProgress


Template:NavBox Hub