5 Replies Latest reply on Aug 8, 2015 8:25 AM by philmodjunk

    Difficulty in following Scripted Search Steps for Set Field

    bokenrosie

      Title

      Difficulty in following Scripted Search Steps for Set Field

      Post

      Having a hard time entering this into script:

      Set Field [YourTable::YourDateField ; Globals::gDate1 & "..." & Globals::gDate2]

      I double click set field and then click specify which comes up with a 1 in the "specify calculation" window.  I try to replace that with my fields

      This is exactly what I am putting in the box: MuniHubNotices::DateRangeMonth ; Globals::gDateRangeFirstDay & "..." &  Globals::gDateRangeLastDay

      I get "a number, text contstant, filed name or "(" is expected error message.

      Any help in getting past this hurdle greatly appreciated.

        • 1. Re: Difficulty in following Scripted Search Steps for Set Field
          philmodjunk

          You have to use both specify buttons.

          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: Difficulty in following Scripted Search Steps for Set Field
            bokenrosie

            Darn!  Felt sure if I could get that step done (thanks for the explicit directions, worked perfectly and I feel like a dope for not trying that) everything would work.  Here's my whole script.  Not getting any found results.

            Go to Layout [ “Invoice to MH” (Notices) ]
            Enter Find Mode [ ]
            Set Field [ Notices::DateRangeMonth ; Globals::gDateRangeFirstDay & "..." & Globals::gDateRangeLastDay ]
            Set Error Capture [ On ]
            Show Custom Dialog [ Title: "Range"; Message: "Range is " & Globals::gDateRangeFirstDay & " to " & Globals::gDateRangeLastDay;
            Default Button: “OK”, Commit: “Yes” ; Button 2: “Cancel” , Commit: “No” ]
            Perform Find [ ]

            • 3. Re: Difficulty in following Scripted Search Steps for Set Field
              philmodjunk

              What kind of field is DateRangeMonth?

              Is it a local, date field?

              A calculation field with a date result type?

              If you run the script adn then select "Modify last find" form the records menu, what do you see in the layout? (This will reproduce the find request that failed to find any records.)

              • 4. Re: Difficulty in following Scripted Search Steps for Set Field
                bokenrosie

                DateRangeMonth was a Date.  Changed it to Text now.

                Still a local field.  Assumed that was what I needed there.  Do I need to change it to global storage?

                When I run the script the results I get are the 38 records I hav for which there is not Date Created value (before I setup the timestamp) so I'm on a path, but not the right one.  Still confused.

                 

                Thanks

                 

                 

                • 5. Re: Difficulty in following Scripted Search Steps for Set Field
                  philmodjunk

                  It needs to be of type date. Not text. It should not be global. Some people that read the example finds thread make the mistake of making the wrong fields global.

                  Timestamp and date fields aren't exactly the same so what exactly are you auto-entering here?