Prompter issue

Viewing 4 reply threads
  • Author
    Posts
  • February 9, 2023 at 1:31 PM #48880

    Ray B
    Participant

    I’ve done everything that I can think of. I can not get the prompter to fill the variables.
    Using Tap Forms Version Version 5.3.30 (1085) on iPadOS.

    I found this Question from Participant johnny_law in support forum, but there was no answer.

    I use the code from snippets of code. Even very simple examples but variables stay as undefined.
    I have changed where the var statements are located before or after the call back function. Nothing!
    What could I be doing wrong?

    Attachments:
    You must be logged in to view attached files.
    February 9, 2023 at 5:53 PM #48884

    Brendan
    Keymaster

    Hmm… I’m going to have to look into this. I just tested it on the Mac version and it’s not working there either.

    Wondering if maybe something changed security wise in the latest iOS and macOS versions? I’m using Ventura and it’s also giving me undefined as the console output in the sample snippet.

    February 9, 2023 at 6:49 PM #48885

    Daniel Leu
    Participant

    Try to define the variables outside of your script:

    var value_1;
    var value_2;
    
    function Script() {
    ...
    }
    
    Script();
    • This reply was modified 1 year, 9 months ago by Daniel Leu.
    February 9, 2023 at 11:42 PM #48888

    Brendan
    Keymaster

    Ah right. I need to change the Snippet code because it’s putting the variables inside the function and that’s causing it not to work. Doh!

    February 21, 2023 at 9:45 PM #48992

    Sam Moffatt
    Participant

    I think the snippet is ok, it’s just if you run the snippet inside of a function it’ll insert it there. I think an improvement for a future prompter would be a way of having the callback accept the return values as a dictionary which would remove the need to have the variables defined at the right scope (which for Javascript is a challenge at times).

Viewing 4 reply threads

You must be logged in to reply to this topic.