Usersettings in "condition to check" when using branching with bots

I’m trying to guide my bot to different templates based on the language the user selected in the usersettings menu.

My first guess was the obvious : USERSETTINGS([Preffered Language])="Dutch"
So this formula lives in the “condition to check” section of the branch menu.
3X_7_8_78b0851a29ea1e3df5c044ee7926bee85f70baf0.png

But this returns : Function ‘USERSETTINGS’ should have exactly 1 parameters, the name of an option from the user settings.

Are usersettings not available to use in bots or am I missing something obvious again?

Thanks!

0 11 546
11 REPLIES 11

Yep.

change to

USERSETTINGS( "Preffered Language" ) = "Dutch"

i.e. quote, not square brackets.

Unable to find column ‘_THISUSER’, did you mean ‘User’?

This is what I get in return

3X_1_b_1b1383efd5fd38f12fbaecd2a043c75db4123d6b.png

Steve
Platinum 4
Platinum 4

Attn @Dan_Bahir

Oh. Bots are run by the server and thus don’t have access to USERSETTINGS, I believe.

Any workaround I could use to get this to work?
I don’t see a way to log the language to the sourcedata as multiple people with different languages could be viewing the data at the same time.

You can implement your own user settings table. Then in the record the Bot is triggering on, have a “created_by” column, auto-filled by USEREMAIL() (this is a smart thing to do for every Table actually). Then the Bot can lookup the language preference by the recorded user email.

I found another way I think.

At the event level the usersettings are accepted as a condition.
So instead of 1 bot branching out I just have to build 20 bots.

If that doesn’t work out in the end I’ll try your option.

I highly recommend building an users table, it’s very userful, and it’s a lot less work than building a bot army.

Hi Marc, I’m running into this same issue where I need to reference data from USERSETTINGS in a task action and getting the same error “Unable to find column’_THISUSER, did you mean …”

We have a public app in our case with no access to USEREMAIL(). Is there any other way to reference USERSETTINGS in a bot?

You could manage a custom user settings table with CONTEXT(“Device”) instead of USEREMAIL().

Or you can record the appropriate USERSETTINGS values into the record that the Bot is triggering on. (I mean invisibly, here, at the same time that the data change happens that triggers the bot).

Thanks Marc, the bot was triggering an action. I was able to use USERSETTINGS by updating the action directly but not by updating the action “from within” the bot. When I ran the bot, it worked as expected.

Thanks again Marc

Top Labels in this Space