AnsweredAssumed Answered

Set Field By Name

Question asked by plegler on Dec 7, 2011
Latest reply on Dec 7, 2011 by philmodjunk

Title

Set Field By Name

Post

I have developed a script that uses the Set Field By Name script step, but the script doesn't produce any results. Here is the situation:

 

- Application imports and processes financial and other numeric/text data for specific periods.

- Numeric data is imported to a "working" or "staging" field, and then needs to be moved to the appropriate "period" field.

- There is a preferences table where the period is set, and related to be accessible as a flag

- I'm trying to use Set Field By Name to move data from the "working" import field, to the appropriate "period" field, and it isn't working

Field name calculation portion of the script step is:

Case ( COST_STRUCTURE_Preferences::Quarter = "Q1";COST STRUCTURE_resource assignments::Q1DQ;

COST_STRUCTURE_Preferences::Quarter = "Q2";COST STRUCTURE_resource assignments::Q2DQ;

COST_STRUCTURE_Preferences::Quarter = "Q3";COST STRUCTURE_resource assignments::Q3DQ;

COST_STRUCTURE_Preferences::Quarter = "Q4";COST STRUCTURE_resource assignments::Q4DQ;

)

 

Calculated value to paste is: 

COST STRUCTURE_resource assignments::WorkingDQ

In Data Viewer, all of the fields, and their values are visible. The Preferences table flag is also visible (properlay related tables)

When the Set Field By Name script step process in Script Debugger it returns Error 102 (Field is Missing). Tables and table instances involved are properly related.

I've looked at the FM help system for this script step, and can't find anything wrong with my sytax. I've read the part about enclosing the field name in quotes, but the examples provided do show a syntax like mine. They use the If function, but I would think the Case function would work as well. It is, after all, the equivalent of a series of nested Ifs.

Any help/suggestions on how to get this working would be very much appreciated.

 
 
 
 

Outcomes