AnsweredAssumed Answered

Stop script from continuing if field is left empty. Help.

Question asked by PaddyCakes on Oct 14, 2011
Latest reply on Oct 26, 2011 by philmodjunk

Title

Stop script from continuing if field is left empty. Help.

Post

Hi everyone, 

The "original file" (the customer file) evokes the script from "current file" in the script below.

The "current file" is responsible for tracking which images the customer has viewed.

The image_ID field in the "current file" is selected (drop down list) from a third file "Images" containing the Image particulars.

I am trying to disallowing the script from continuing unless the Image_ID is not empty.

The below script works except, if the user has left the Image_ID field empty, then selects "Try Again"and then, for a second time, leaves the Image_ID field empty, selects continue, the script continues, allowing an empty Image_ID field.

How can I disallow this script from continuing unless the Image_ID is not empty.

If left empty, I would like the Message Dialogue Box choice 1 to be repeated endlessly.

 

  • New Record/Request
  • Go to Layout [ “Add Record” (CurrentFile) ]
  • Insert Current Date [CurrentFile::Date ] [ Select ]
  • Paste [ CurrentTable::Client ID ] [ Select ]
  • Go to Field [ CurrentFile::Image ID ] [ Select/perform ]
  • Pause/Resume Script [ Indefinitely ]
  • Commit Records/Requests [ No dialog ]
  • If [ GetAsBoolean ( CurrentFile::Image ID ) = 0 ]
  • Show Custom Dialog [ Title: "No Image ID"; Message: "The Image ID field has been left empty"; Buttons: “Try again”, “Cancel” ]
  • If [ Get ( LastMessageChoice ) = 1 ]
  • Go to Layout [ “Add Record” (CurrentTable) ]
  • Clear [ CurrentFile::Image ID ] [ Select ]
  • Go to Field [ ]
  • Go to Field [ CurrentFile::Image ID ] [ Select/perform ]
  • Pause/Resume Script [ Indefinitely ]
  • Go to Layout [ “Reports” (CurrentFile) ]
  • Open File [ “Original File” ]
  • Else If [ Get ( LastMessageChoice ) = 2 ]
  • Delete Record/Request [ No dialog ]
  • Go to Layout [ “Reports” (CurrentFile) ]
  • Open File [ “Original File” ]
  • End If
  • End If
  • Go to Layout [ “Reports” (CurrentFile) ]
  • Open File [ “Original File” ]

 

TIA !!!

Outcomes