AnsweredAssumed Answered

Script Error

Question asked by mehbastan on Jul 5, 2018
Latest reply on Jul 5, 2018 by mehbastan

Hi Everyone

I have a database that has many client. I make Student Director for these schools. Some are French and some are English.

I made a script that when a school is not French to warn me before creating the Directory Cover. but when the language is correct I want it to go to the appropriate layout and Pause.

The script works when the Language is not correct but doesn't do anything when the language is correct.

What is wrong in this script?

Thanks

 

 

If[School::Language # "F" ]

     Show Custom Dialog ['Warning"; "This is not a French School. Are you sure you want a French directory?"]

     If[Get (LastMessageChoice)=2

          Exit Script

     Else

          SetVariable [$SchoolID; Value:School::_School_ID]

          perform Find [Restore]

          Go to layout ["Student Directory Cover'(School)]

          Show/hide toolbar[Show]

          Adjust Window[Maximum]

          Enter browse mode[Pause]

          go to layout ['Main' (School)]

          Adjust Window [maximum]

          Show All Records

     End If

End IF

Outcomes