Jump to content
Sign in to follow this  
jl2017

Issue displaying dialogs using new window card feature in FM16

Recommended Posts

So I am very close to getting my modal custom dialog windows to work with the new window card feature that was introduced in FileMaker 16.  I have a script in my database that allows users to type in a list and the script parses out the information and finds the appropriate records in my database.  When a record isn't present, a custom dialog pops up and notifies the user that the record is not present in the database.  The script works flawlessly with the old show custom dialog and will cycle through every record that is not present...popping up a custom dialog for each one.  However, using the new window card feature...it is only popping up the first record that is not present and stops there.  If I have multiple records that do not exist, the new window card feature fails to cycle through them.  Trying to figure out if I am missing a step between how the custom dialog window and the new window card feature commit data?  Here is the script using the show custom dialog method:

Close Window [ Name: "Multiple Shot Find" ]

Set Error Capture [ On ]

Set Variable [ $Selects; Value:VFX Counts::VFXCounts_ShotFind ]

Go to Layout [ original layout ]

Adjust Window [ Hide ]

Go to Record/Request/Page [ First ]

Set Variable [ $R; Value:Get ( FoundCount ) ]

Omit Multiple Records [ $R ]

[ No dialog ] Set Variable [ $i ; Value: 1 ]

Loop

Set Variable [ $Select; Value:GetValue ( $Selects ; $i ) ]

Exit Loop If [ $Select = "" ]

Enter Find Mode [ ]

Set Field [ VFX Counts::VFXCounts_ShotNumber; VFX Counts::VFXCounts_ShotFindRange & $Select ]

Extend Found Set [ ]

If [ Get ( LastError ) ≠ 0 ]

Show Custom Dialog [ Title: "Warning"; Message: $Select & ¶ & "This is currently not a shot, please check the spelling."; Default Button: “OK”, Commit: “Yes” ]

End If

Set Variable [ $i ; Value: $i+1 ]

End Loop

Perform Script [ "Go to VFX Counts" ]

Adjust Window [ Restore ]

 

And here is the new window card method:

 

Close Window [ Name: "Multiple Shot Find" ]

Set Error Capture [ On ]

Set Variable [ $Selects; Value:VFX Counts::VFXCounts_ShotFind ]

Go to Layout [ original layout ]

Go to Record/Request/Page [ First ]

Set Variable [ $R; Value:Get ( FoundCount ) ]

Omit Multiple Records [ $R ] [ No dialog ]

Set Variable [ $i; Value:1 ]

Loop

Set Variable [ $Select; Value:GetValue ( $Selects ; $i ) ]

Exit Loop If [ $Select = "" ]

Enter Find Mode [ ]

Set Field [ VFX Counts::VFXCounts_ShotNumber; VFX Counts::VFXCounts_ShotFindRange & $Select ]

Extend Found Set [ ]

If [ Get ( LastError ) ≠ 0 ]

Go to Layout [ “VFX Counts” (VFX Counts) ]

Perform Script [ “Dialogue Script”; Parameter: "WARNING|" & TextSize( TextFont( TextColor ( $Select; RGB( 51 ; 153 ; 204 ) ); "Arial" ) ; 24) & ¶ & ¶ & "This is currently not a shot, please check the spelling.|OK" ]

If [ $$ButtonResult = 1 ]

Commit Records/Requests [ With Dialog: Off ]

End If

End If

Set Variable [ $i ; Value: $i+1 ]

End Loop

Go to layout [ "VFX Counts" (VFX Counts) ; Animation: None ]

 

Anyone have any thoughts as to what I am doing wrong?

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.