I have the following Control Macro
'$include: "bsl.dh" 'PARAS Control Macro Sub ProcessImportLine( LevelNumber%, Retval% ) select Case LevelNumber case TI_Start
call AliasConstant( "Level0", "ProjTask" )
call AliasConstant( "Level1", "TaskAssign" )
case 0 ' 0 of 1
'Level 0 if of Type N ' cProject is a key field for level 0 ' Field mask is WWWWWWWWWWWWWWW ' NOTE -- This field is a required field serr = SetObjectValue( "cProject", ImportField(1) )
' cTask is a key field for level 0 ' Field mask is 999 ' NOTE -- This field is a required field serr = SetObjectValue( "cTask", ImportField(2) )
'Currently Disabled cproject_desc
'Currently Disabled cpjt_entity_desc
case 1 ' 1 of 1
'Level 1 if of Type D ' cresemployee is a key field for level 1 ' Field mask is UUUUUUUUUU ' NOTE -- This field is a required field serr = SetObjectValue( "cresemployee", ImportField(1) )
' cSubtask is a key field for level 1 ' Field mask is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' serr = SetObjectValue( "cSubtask", ImportField(2) )
'Currently Disabled cresname
' cressdate is a Date Field Type ' NOTE -- This field is a required field ' serr = SetObjectValue( "cressdate", ImportField(3) )
' cresedate is a Date Field Type ' serr = SetObjectValue( "cresedate", ImportField(4) )
'Currently Disabled cresActuals
serr = SetObjectValue( "cresbudhrs", ImportField(2) )
serr = SetObjectValue( "cresbudamt", ImportField(3) )
' Field mask is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ' serr = SetObjectValue( "cComment", ImportField(7) )
case TI_Finish
serr = SetObjectValue( "cmdUpdLabBud", "PRESS" )
End Select
End Sub ' The following shows the correct syntax to ' PRESS a button ' These object names are specific to this screen. ' Button object name cmdUpdLabBud, Caption &Update Budget ' serr = SetObjectValue( "cmdUpdLabBud", "PRESS" )
' Button object name cmdAssignInq, Caption &Assignment Inquiry ... ' serr = SetObjectValue( "cmdAssignInq", "PRESS" )
If I have a file with one Project Task level and multiple Resource lines the button presses and the Budget gets updated. How do I scales this up to multiple Project Task lines. Where the button press command is will only press the button at the end of the import process. I cannot work out where the code line should be placed to press the button when the project task changes