2 Replies Latest reply on May 12, 2014 9:25 AM by bdexter75

    Set Field won't work in script...



      Set Field won't work in script...


           I know this is dead simple, but I just can't get this "Set Field" script step to accept the ( ;"" ) parameter and I've been working on it for 3 hours.

           All the script does is go to a date field (DateDue) and clear out the date.  When I add the Set Field step and specify the record and field it tells me that an operator (eg. +, -, *,....) is expected here. I've searched the examples in the forum and tried to input this simple command step, but it just won't accept it like it is shown below.

           Set Field [Record::DateDue;""]

           If I use the calculation option, it clears out the date okay, but then replaces it with a "?" mark.  In this case, the only way it will work is when I used ( Record::DateDue = "" ).  However, from the posts I've reviewed this is apparently incorrect.  I'm using FM12 Pro.

           Any help would be appreciated.  Thanks.

        • 1. Re: Set Field won't work in script...

               When Setting up Set Field, there are two Specify buttons that must be clicked. To get Set Field [Table::Field ; Expression], add set field to your script and click the first button (specify target field). Select Table::Field from the list of fields. Do not click the specify button next to the repetition box. Click OK to close this dialog box. Now click the lower specify button (calculated result) and create the expression to the right of the semicolon (;). Do not try to type in the semicolon.

          • 2. Re: Set Field won't work in script...

                 Thanks PhilModJunk.  I knew it was something simple, and I really don't fully understand the specifying criteria thing yet.  Now it works great.