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.
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!
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
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
User | Count |
---|---|
40 | |
36 | |
31 | |
23 | |
16 |