Importing daily timecard comments

This question is not answered

Does anyone know how to import daily timecard comments from an external source into Timecard Entry?

All Replies
  • Hi Chuck,

    You need a specific control macro which I have copied below.  Give this a try and let me know how it goes.

    '$include: "bsl.dh"

    'PANOT Control Macro

    Sub ProcessImportLine( LevelNumber%, Retval% )

     select Case LevelNumber

       case TI_Start

         call AliasConstant( "Level0", "notes" )

       case 0 ' 0 of 0

       'Level 0 if of Type N

         ' cnote_type_cd is a key field for level 0

         ' Field mask is UUUU

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "cnote_type_cd", ImportField(1) )

         ' ckey_value is a key field for level 0

         ' Field mask is UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "ckey_value", ImportField(2) )

         ' ckey_index is a key field for level 0

         ' Field mask is 99

         ' NOTE  -- This field is a required field

         serr = SetObjectValue( "ckey_index", ImportField(3) )

         call setprop("txtmsg","text",ImportField(4))

    'Currently Disabled clu_logon_id

    'Currently Disabled cnote_desc

    'Currently Disabled clu_date

       case TI_Finish

     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 cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

    '      Button object name cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

    '      Button object name cmdButnBar, Caption

    '      serr = SetObjectValue( "cmdButnBar", "PRESS" )

    Carolyn

    Technical Support Engineer

    **This posting is provided "AS IS" with no warranties and confers no rights.

  • Carolyn

    Thanks a lot!

    Chuck

  • Carolyn

    Does this macro apply to a timecard that already exists?  If so, is there a different macro for importing daily comments as part of a new timecard?

    Thanks,

    Chuck

  • Hi Chuck,

    I believe it will work for both since the comments have to be imported separately from the timecard import.  Let me know how it goes.

    Carolyn

    Technical Support Engineer

    **This posting is provided "AS IS" with no warranties and confers no rights.

  • Carolyn

    Sounds good.

    Thanks again,

    Chuck