This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Designer Edit Script

Hi,

We have imported a web service and the functions for it, but certain functions need to be called in a linear sequence by a wrapper function so we've created a new script to do it.

These all test OK.

Problem is, in the "Test script" panel of Designer we can only pick the individual web service functions for testing, not our new script which contains a function that calls each one sequentially.

Is there something you need to do with a script to enable it to be tested in Designer?

  • Not that I'm aware of. Basic checks - make sure the script has been committed, then re-open your designer connection. See if that helps
  • (Apart from: saving the script, committing to the database, compiling, reloading data, closing and reopening Designer...)

    We cannot see what is different between the scripts containing each individual web service function / scripts copied from existing scripts, and a brand new script with a completely new function in it. (This is in v7.1.2).

  • Did you tried the test compile button in the Script Editor in Designer? I think I remember that this allows you to test the script when you have freshly created it in Designer.

  • It's not freshly created. It's already saved, committed, compiled and isn't locked either. We still can't see it in the pick list of "Test Script" and if we open the script for editing, we still can't test it from there.

    If we look at any of the other scripts that were created by the system when importing the web service, we can't see any logical difference.

    To simplify it - our wapper function calls ws_connect, ws_post and ws_disconnect. All three of those functions in scripts that can be tested. Our script cannot be tested but all it's doing is calling each of those functions in sequence.
  • Might be worth a shot to clear the cache (both from within designer and also delete temp files in %AppData%) ?
  • Ah. Smoking gun...

    I think the issue arises if the script name doesn't exactly match the Public Function name in the codeblock. After ensuring they are identical, it seems to work OK.
  • The script name is irrelevant. The script tester will always use the function name you specify in the code. You may have missed it that way. But this even works if you specify more than one function in a single DialogScript.
  • Hmm...

    The one change I made that got it working properly was, I renamed the Public Function inside the codeblock so at least one function in the script had the exact same name as the script name. Everything else I tried prior to that had no effect at all. At least it's working now, but when I get some time I'll test it with another function and if I can reproduce it, I'll raise it with support.

    Thanks Markus