Attached and included are two nearly identical versions of the same code. The only difference are the inclusion/exclusion of the square brackets around the field name. The unbracketed field name works, however the bracketed field name does not. I'd like to use the SetField command with date fields too, but I don't know how to tell the SetField command that it is receiving the raw value? [mydatefield,0] vs [mydatefield,1] or should it be coded SetField(mydatefield, [workdate,0]). Guidance please.
RMX - V:8
if( IsPlaying() ,
>>>>
If( IsEmpty( [WorkList1x] ), Save( , GVWorkList2x ), Save( [WorkList1x] , GVWorkList2x ) )
If( IsEmpty( [SmartList] ), Save( , GVWorkList1x ), Save( [SmartList] , GVWorkList1x ) )
SetField( [WorkList2x], Load( GVWorkList2x ) )
SetField( [WorkList1x], Load( GVWorkList1x ) )
If( IsEmpty( [Last Played] ), Save( , GVLastPlayed ), Save( FormatDate( [Last Played,0] , dd MM yyyy ) , GVLastPlayed ) )
If( IsEmpty( [WorkDate1x] ), Save( , GVWorkDate2x ), Save( FormatDate( ConvertDate( [WorkDate1x] ), dd MM yyyy ) , GVWorkDate2x ) )
If( IsEmpty( [Last Played] ), Save( , GVWorkDate1x ), Save( FormatDate( ConvertDate( [Last Played,0] ), dd MM yyyy ) , GVWorkDate1x ) )
SetField( [WorkDate2x], FormatDate( ConvertDate( Load( GVWorkDate2x) ), MM//dd//yyyy ) )
SetField( [WorkDate1x], FormatDate( ConvertDate( Load( GVLastPlayed) ), MM//dd//yyyy ) )
SetField( WorkString, LP: FormatDate( ConvertDate( Load( GVLastPlayed) ), MM//dd//yyyy ) WL1x: Load( GVWorkList1x ) WD1x: FormatDate( ConvertDate( Load( GVWorkDate1x ) ), MM//dd//yyyy ) WL2x: Load( GVWorkList2x ) WD2x: FormatDate( ConvertDate( Load( GVWorkDate2x ) ), MM//dd//yyyy ) )
,
FormatDate( Now(), datetime )
)
RMX - V:9
if( IsPlaying() ,
>>>>
If( IsEmpty( [WorkList1x] ), Save( , GVWorkList2x ), Save( [WorkList1x] , GVWorkList2x ) )
If( IsEmpty( [SmartList] ), Save( , GVWorkList1x ), Save( [SmartList] , GVWorkList1x ) )
SetField( WorkList2x, Load( GVWorkList2x ) )
SetField( WorkList1x, Load( GVWorkList1x ) )
If( IsEmpty( [Last Played] ), Save( , GVLastPlayed ), Save( FormatDate( [Last Played,0] , dd MM yyyy ) , GVLastPlayed ) )
If( IsEmpty( [WorkDate1x] ), Save( , GVWorkDate2x ), Save( FormatDate( ConvertDate( [WorkDate1x] ), dd MM yyyy ) , GVWorkDate2x ) )
If( IsEmpty( [Last Played] ), Save( , GVWorkDate1x ), Save( FormatDate( ConvertDate( [Last Played,0] ), dd MM yyyy ) , GVWorkDate1x ) )
SetField( WorkDate2x, FormatDate( ConvertDate( Load( GVWorkDate2x) ), MM//dd//yyyy ) )
SetField( WorkDate1x, FormatDate( ConvertDate( Load( GVLastPlayed) ), MM//dd//yyyy ) )
SetField( WorkString, LP: FormatDate( ConvertDate( Load( GVLastPlayed) ), MM//dd//yyyy ) WL1x: Load( GVWorkList1x ) WD1x: FormatDate( ConvertDate( Load( GVWorkDate1x ) ), MM//dd//yyyy ) WL2x: Load( GVWorkList2x ) WD2x: FormatDate( ConvertDate( Load( GVWorkDate2x ) ), MM//dd//yyyy ) )
,
FormatDate( Now(), datetime )
)