Variable input

Questions, comments, and suggestions related to Typeitin.
Post Reply
Morenicano
Posts: 2
Joined: Fri Jun 10, 2022 6:38 pm

Variable input

Post by Morenicano » Fri Jun 10, 2022 6:49 pm

Hi. I'm using buttons to make contact attempts and also provide links in my response. Currently, my buttons type out the entire message and then I wait and add the person's name and the link I'm sharing with them to personalize the message, but is there a way that I can either activate the button and it asks me for that info before it types it out and then fills the missing info in while it's typing the rest of the message or any other way I can achieve this goal without having to wait for it to finish typing the whole message first?

Wavget
Site Admin
Posts: 91
Joined: Wed Jan 16, 2019 4:32 pm

Re: Variable input

Post by Wavget » Sat Jun 11, 2022 12:15 pm

You can use {Var =?} to ask for user input.

For example: {Var1 =?}You entered {Var1}{Enter}

To add a prompt to the input dialog you can use {Var =?Enter name}.

You can also add a default response with {Var =?Enter name|Paul}.

Morenicano
Posts: 2
Joined: Fri Jun 10, 2022 6:38 pm

Re: Variable input

Post by Morenicano » Mon Jun 13, 2022 10:59 am

Thank you! This is perfect! Question, can you declare the variables before it starts typing? Like, can I have it ask all the questions first and then after the questions are asked, then it fills in the answers as it types? Right now, I tried it like this, but both variables are returning as the URL that was typed in the second prompt. Here is how I have it setup.

{VarName =?Enter the user's name for the greeting}{VarTicketURL =?Enter the URL for the ticket being referenced}Hi {VarName}.{Shift {Enter}{Enter}}To see your ticket, click here: {VarTicketURL}

Wavget
Site Admin
Posts: 91
Joined: Wed Jan 16, 2019 4:32 pm

Re: Variable input

Post by Wavget » Tue Jun 14, 2022 9:08 am

You have to store each response in a separate variable. There are 100 variables, {Var} and {Var1} ... {Var99}

In this example Var1 is used for the name and Var2 for the URL.

{Var1 =?Enter the user's name for the greeting}{Var2 =?Enter the URL for the ticket being referenced}Hi {Var1}.{Shift {Enter}{Enter}}To see your ticket, click here: {Var2}

In the Network and Enterprise version you can name a variable. In this example Var1 is named _Name and Var2 is named _Link.

{Var1 Name _Name}{Var2 Name _Link}{Var_Name =?Enter the user's name for the greeting}{Var_Link =?Enter the URL for the ticket being referenced}Hi {Var_Name}.{Shift {Enter}{Enter}}To see your ticket, click here: {Var_Link}

Post Reply