AnsweredAssumed Answered

Getfield() question

Question asked by dsimonson on Jan 26, 2015
Latest reply on Jan 28, 2015 by dsimonson


Getfield() question


I am writing a script where I want to gather an amount, put it in a variable, and then go to a different layout and add that amount to a field whose name I will set using another variable.  Not having any luck.  

The field I want to add to is called med_amt_1, med_amt_2, and so on.  I was hoping to be able to identify the field by just concatenating a number to the end of "med_amt_", as in "med_amt_"&MedTime (MedTime is a number, 1 - 40)

Here's how I set the variable, $FieldContents: 

Let (
@fieldname =  "surgeries_GRAPH_MEDS_15_MIN::med_amt_"&$MedTime; 

at present, this returns "?".  Note that I tried to deal with the quotes by escaping them, I don't know if that is helping or hurting.   

Once I get this variable to add the new amount to the current contents of the med_amt, I want to replace the contents of the field.  

Thorny problem!  I hope the answer isn't too easy... ;>)