1 Reply Latest reply on Jan 8, 2014 8:23 AM by philmodjunk

    Checking Data existence function

    JeongwungJeong

      Title

      Checking Data existence function

      Post

           Hello

           I want to make a script which checks data existence from the specified table. If there is no data in the table the script is keep going otherwise it stops. Actually I tried to use "Perform find" and "IsEmpty" functions. It worked. But the "dialog box" which is shown up when the data is not found is problem on the script progress.

           I think it is simple question but I couldn't found proper solution in this forum.

           Is there any functions or scripts for checking data existence??

           Thank you

           Wung

        • 1. Re: Checking Data existence function
          philmodjunk

               The details of what you should do depend on exactly what you mean by "If there is no data in the table..."

               If your script needs to check to see if there are no records at all in the table, have it go to a layout based on that table and then Get ( TotalRecordCount ) will return the number of records in that table.

               If you want to see if there are any records in that table that are linked via a relationship to the current record on your current layout, IsEmpty ( RelatedTable::NeverEmptyField ) will return True if there are no related records.

               To keep the "no records" dialog from interrupting a script that performs a find, put:

               Set Error Capture [on]

               just before the Perform FInd script step.