Using Siri to run scripts

Viewing 2 reply threads
  • Author
    Posts
  • December 22, 2019 at 2:05 AM #38865

    Marcus
    Participant

    Maybe I‘m missing something, a basic question how to use Siri to run a script.

    I am in the record edit view and want to copy a field value to the clipboard.

    The script works fine by executing manually:

    function Clipboard() {
    var title_id = 'fld-76b2c64fccc34c20b62b7d485f5bfa28';
    var clip = record.getFieldValue(title_id);
    Utils.copyTextToClipboard(clip);
    return clip;
    }
    
    Clipboard();

    I added this script to Siri, the result is just
    „.undefined“

    (iOS, iPhone)

    Attachments:
    You must be logged in to view attached files.
    December 22, 2019 at 12:31 PM #38867

    Sam Moffatt
    Participant

    Siri executes scripts in a form context not a record context. Siri doesn’t have the context that Tap Forms is executing in and the intent that is being executed I believe is distinct from the main Tap Forms application. This is part of the way Apple have implemented the Siri support.

    I also have struggles using Siri with clipboard access, scripts invoked from Siri don’t seem to have access to the clipboard but when I run those same scripts manually they are able to pull the clipboard properly. I’m not sure if writing to the clipboard would have a similar problem.

    December 23, 2019 at 3:29 PM #38874

    Marcus
    Participant

    Okay, thanks.
    Sounds like Siri will be useless for me in this case.

Viewing 2 reply threads

You must be logged in to reply to this topic.