Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Custom Dialogue question

Featured Replies

Ok I would like a custom dialogue comming up with a question and depending on the button pressed run either script 1 or script 2

however there does not seem to be a way of running a script from custom dialogue : which can't be right....

The custom dialog would be called from within a script. Then the button choice would branch the script to the appropriate subscript using Get(LastMessageChoice).

The pseudo code for the script should be along the lines of

Show custom dialog (with your question, and the answer to perform script 1 should be the defaullt button. Button 2 should be the naswer for script 2 to be done)

If [Get{Last message choice) = 1]

Perform script [1]

else

Perform script [2]

Edited by Guest

  • Author

somehow the show custom dialogue with the IF statement seems to break a local variable I created to create the file name and path to save the file...

so the variable is not recognised :?

What could be going wrong there :)

Hi

make that variable global ( $$ ) and set it to empty at the end of your script.

  • Author

Thanks when I call it do I need to call it with

$$myvariable

or

$myvariable

how do I clear it ?

Thanks.......

1) $$myvariable

2) Set Variable [ $$myvariable; Value: ""]

  • Author

thanks..

  • Author

It seems my variable for setting the file name and saving to the temp path is not working with a double script like this it does work when I just have a simple script with no IF statements etc....

I have

Set Variable [$$filepath; Value: Get ( TemporaryPath ) & $fieldname & ".pdf"]

which works for a simple script to print out a load of layouts at once and name the file with a pre determined name.

However when I put in a dialogue box and a IF statement the filee name is not remembered and cannot be used for saving the file.

You get this error...

"$$filepath" could not be created on this disk. Use a different name, make more room on the disk, unlock it or use a different disk.

You need $$filepath to start with "file:"

  • Author

you mean.....

Set Variable [$$filepath; Value: file: & Get ( TemporaryPath ) & $fieldname & ".pdf"] ?

Yes. Check out Help for Creating File Paths

Also, the reason that you've been instructed to use a global variable is bcs it seems that you are passing $filepath to another script and local variables only exist in the script that creates them. You could also use a scriptparameter.

  • Author

How come it worked OK before without this ?

I mean I realise it does not work now .....

But it did and it still does in a single simple script...

Post the file, please. Also, now you're going from one script to another. Any local variables do not carry over to another script.

Since I've never seen your original script, all I can do is guess.

When is $fieldname set?

Edited by Guest

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.