AnsweredAssumed Answered

FMI script perform search returning no records

Question asked by wkparkjoe on Oct 26, 2010
Latest reply on Oct 26, 2010 by wkparkjoe


FMI script perform search returning no records


I need to come up with a logic in a script where I can count the records for a certain search criteria. If there are no records then I want to run another script that goes back ot the main layout. Currently when I run the script I have set I do the following:

If [Get ( CurrentPrivilegeSetName ) = "User 1"]
  Perform Find [Restore]
  Set Variable [$recordcount; Value:Get ( FoundCount )]
  If [$recordcount = 0]
    Show All Records
    Perform Script ["Goto Entry Screen"]
  End If
End If

If I run this script and there are no records found in the Perform Find, on the FMI web page I am stuck in a search. I would rather be able to do a count first if possible then do a Perform Find. Is there a way to do this? Thanks!