Feature update – Q&A site, retrieve email address of a logged in user, configure "reply-to" for emails and two new methods!

Here’s what’s new:

Q&A site

Do you have a question? Go to https://answers.guidedtrack.com/questions and ask the GuidedTrack community or browse through the questions that have already been posted.

You can also find the link to the the Q&A site under the “Help” menu:

And if you see a question that you have the answer to, please don’t hesitate to share it!

Get the email address of a logged in user

Now you can retrieve the email address of a logged in user of your program. Here is the syntax:

We have created a new *database command that allows your program to interact with GuidedTrack’s database. For now, it can only be used to retrieve a user’s email address but in the future you will be able to create, update and delete records – just stay tuned!

Now, in order to protect the privacy of GuidedTrack users, they may need to grant permission to your program so that it can get their email address. When this happens, they will see a modal like this:

In the example shown, the program with the *database request has been named “University of Hobbiton” in Settings>Branding>Public Name, if you don’t create a public name for your program the modal will display your program’s name.


When will users see the modal?

Your logged-in users will only see the modal the first time they run the program, except if the program requires login and they created their GuidedTrack account when trying to run the program. 


When will users not see the modal?

They will not see the modal if they already allowed your program to access your email address:

  • Explicitly, by typing their email address when they were prompted to the first time that they run your program.
  • Implicitly, by creating a GuidedTrack account when running your program for the first time.


What happens someone clicks on “Deny”?

If your user clicks on the “Deny” button of the modal, the *database request will throw an error where the reason is “email access denied by user” and the message, “The user denied access to their login email address.”


What happens if the user is not logged in?

In this case the *database request will also throw an error with the reason “user logged out” and message “The program cannot access the user’s email address because they are logged out.”

Remember, you can configure the login settings of your program in Settings>Login.

Configure a “Reply-to” address

You can set up an email address for when your users reply to an email that has been generated within your GuidedTrack program.

Go to Settings>Branding and enter the address under Email Reply-to address:


New functions: .text and .type

.text function

This function takes any type of variable (number, collection, date, etc) and converts it into text:

In this example, the value of oneThirdText is 0.3333333333333333.

Look at this code now:

Is the value of oneThirdText the same as when using the .text function? Actually, it isn’t! In this case, the value of oneThirdText is 0.33. This is because we are assigning to oneThirdText the display representation of the variable oneThird, which rounds numbers to two decimals. 

Use the .text function when you want your text variable to resemble the original variable as much as possible (for example, when you’re sending a number with decimals to Airtable using *service)  and use “{variableName}” for readability (such as when you are displaying a value on the screen).


.type function

The .type function converts any variable into a text representation of its type. 

When you run the code above, the value of typeOfVariable becomes collection. Below is a list of all the variable types with sample code on how to generate them:

Variable type Sample variable Variable generation
number 3.1416 >>pi = 3.1416

string

(a.k.a. text)

This is some text >>demoText = “This is some text”

collection

(a.k.a. array, list)

[“apples”,”butter”,”chocolate”] >>shoppingList = [“apples”, “butter”, “chocolate”]

association

(a.k.a. hash table, dictionary, map)

{“Amy”->”12/24″ , “Lucy”->”3/12″} >>bdays = {“Amy” -> “12/24”, “Lucy” -> “3/12”}
datetime December 30th, 2020, 10:05 AM

>>thisMoment = calendar::now

>>thisMoment = calendar::date({ “month” -> 12, “day” -> 30, “year” -> 2020, “hour” -> 10, “minute” -> 05 })

date December 30th, 2020

>>thisMoment = calendar::date

>>thisMoment = calendar::date({ “month” -> 12, “day” -> 30, “year” -> 2020})

time 10:11 AM

>>thisMoment = calendar::time

>>thisMoment = calendar::time({ “hour” -> 10, “minute” -> 11})

duration 5 minutes

>>waitTime = 5.minutes

>> timeElapsed = calendar::date – calendar::date({ “month” -> 12, “day” -> 30, “year” -> 2020})