@GetField or similar in R5 for Dates and numbers

I have been trying to find a way to get the value of various fields in R5 using formula. I can use @Abstract to get the text fields but cannot find a way to get the date or number fieldsI have the following formula to get the name of the field required

Promptvalue:=@Prompt([OKCANCELLIST];“Selection Box”;“Select Activity Number to modify”;“”;@Explode(ActivityNumbersChosen));

Positionvalue:=@Member(@Text(Promptvalue);@Explode(ActList));

ActivityEntryfield:=“Activity”+@Text(Positionvalue)+“Title”;

I then need to get the value of the field.

I have over 100 fields that I need to get values from in this way so cannot use the @if statement that some have suggested.

I know I can probably use LS but have a lot of code in Formula around all this

I have posted on this forum as the 4/5 forum is not as active

Any suggestions much appreciated

Subject: @GetField or similar in R5 for Dates and numbers

sorry but I don’t quite follow what you’re trying to do. Can you explain further? It’s hard to picture your workflow so pls try your best to explain step by step what you need to happen.

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

Subject: RE: @GetField or similar in R5 for Dates and numbers

I would need to see it in action. want to send me a stripped down version of your db with enough in it for me to test with? you can reach me on yahoo at psmerdon

Subject: I think you’re stuck with LotusScript, but…

you might not have to rewrite all your formulas if you don’t want to spend the time making things neat and tidy.

The way I’ve seen @Formula and LotusScript kludged together is to have a master agent runner that does:

@Command([ToolsRunMacro]; “FormulaAgent”);

@Command([ToolsRunMacro]; “LotusScriptAgent”);

@Command([ToolsRunMacro]; “FinalFormulaAgent”)

where they pass info to each other using environment variables.