Subject: RE: @GetField or similar in R5 for Dates and numbers
The code I have pasted is on an Edit Table buttonThe table has 100 rows and 8 columns
Each row contains an activity number which may be in sequence or not
I want the user to be able to select the activity number and then I need to pick up from the table the data for that row - some of the data is dates and numbers
I then call a dialogbox to display this data where the user can edit the relevant entries
All this works except that I cannot get the value of a field from the table if it is a date or a number
The whole formula for the Edit button is below
Hope this makes more sense to you
@Command ([EditDocument];“1”);
FIELD ActivityEntryNr:=“”;
FIELD ActivityEntryTitle:=“”;
FIELD ActivityEntryLeader:=“”;
FIELD ActivityEntryStart:=null;
Promptvalue:=@Prompt([OKCANCELLIST];“Selection Box”;“Select Activity Number to modify”;“”;@Explode(ActivityNumbersChosen));
@If(@IsError(@Trim(PromptValue));@Return(@Prompt([OK];“Error Message”;“You failed to make a selection. Process Cancelled.”));@Success);
ActList:=ActivityNumbersChosen;
Positionvalue:=@Member(@Text(Promptvalue);@Explode(ActList));
FIELD ActivityEntryNr:=Promptvalue;
ActivityEntryfield1:=“Activity”+@Text(Positionvalue)+“Title”;
ActivityEntryvalue1:=@Abstract([TextOnly];50;“”;ActivityEntryfield1);
FIELD ActivityEntryTitle:=ActivityEntryvalue1;
ActivityEntryfield2:=“Activity”+@Text(Positionvalue)+“Leader”;
ActivityEntryvalue2:=@Abstract([TextOnly];50;“”;ActivityEntryfield2);
FIELD ActivityEntryLeader:=ActivityEntryvalue2;
ActivityEntryfield3:=“Activity”+@Text(Positionvalue)+“Start”; <–This is a date field
ActivityEntryvalue3:=@Abstract([TextOnly];50;“”;@Text(ActivityEntryfield3)); ← Nothing is returned here - How can I get the value of a date field? Same problem if number field
FIELD ActivityEntryStart:=ActivityEntryvalue3;
@Command([ViewRefreshFields]);
continue:=@DialogBox(“TableEditing”; [AutoHorzFit] : [AutoVertFit] );
@If(continue;“”;@Return(“”));
Fieldname1:=“Activity”+@Text(Positionvalue)+“Nr”;
@SetField(fieldname1;ActivityEntryNr);
Fieldname2:=“Activity”+@Text(Positionvalue)+“Title”;
@SetField(fieldname2;ActivityEntryTitle);
Fieldname3:=“Activity”+@Text(Positionvalue)+“Leader”;
@SetField(fieldname3;ActivityEntryLeader);
Fieldname4:=“Activity”+@Text(Positionvalue)+“Start”;
@SetField(fieldname4;@Date(ActivityEntryStart));
@Command([ViewRefreshFields])