AnsweredAssumed Answered

Set Field By Name

Question asked by akoydaman on Feb 10, 2019
Latest reply on Feb 10, 2019 by akoydaman

I'm trying to identify what field to perform find on based on what layout was just identified and opened.  For the 'New Window', this works fine.  I use the Layout by calculation using a specific 'flag' field value using the case function.  Again this works fine and the proper layout opens.  As there are (5) different layouts that could open I'd like to use one calculation to reference the 'find' field and thought the 'Set Field By Name' would work.  Here is what I have that doesn't work.


In the Target Field:


Case (

Get ( LayoutNumber ) = 2 ; Table 1::Field ;

Get ( LayoutNumber ) = 3 ; Table 2::Field ;

Get ( LayoutNumber ) = 4 ; Table 3::Field ;

Get ( LayoutNumber ) = 5 ; Table 4::Field ;

Get ( LayoutNumber ) = 7 ; Table 5::Field ;



In the 'Calculated Result' I have a Global Variable.  When I put the above script steps in the data viewer I get the value of the Global Variable.


I know I can do this with the IF function (and a few Else IF) but I thought this would save me some typing (that I'm now doing) and accomplishing this a cleaner way.  (BTW once I have performed the search and have located the proper record I was going to use this say idea to write to a few fields.)


Any help would be appreciated!