Help with CSV exports

Hi community

I need some advice on exporting a CSV. I have gone through the steps in the documentation, listed below, but the app is broken after saving. I tried putting the locale CSV locale and the “en-GB” in quotes and without quotes to see if it madea difference but it didn’t. Is there something I’m missing?

https://support.google.com/appsheet/answer/11512216?sjid=16536529571498424249-EU

https://support.google.com/appsheet/answer/11579290?sjid=16536529571498424249-EU

https://support.google.com/appsheet/answer/11579391?hl=en#zippy=%2Cif-you-are-using-the-legacy-navigation

My hunch is that because this is a bot, its operating without login information- UserEmail() is NULL. So therefore _THISUSER will not work as no one is logged in.

Does it work if you write it like ANY(_Per User Settings[CSVLocale])?

1 Like

When trying to reference user settings values in automations, I observe inconsistent behavior and encounter confusing information in AppSheet Help and from AppSheet Support. I’d appreciate your perspective.

First of all, regarding @Simon_Robinson 's question, my understanding is that the key distinction is whether the automation is triggered by a data change, in which case the user settings values from the user’s device where the change occurred should indeed be available for reference in the automation, or triggered on a schedule, in which case there’s no user’s settings to reference. Is that your expectation?

Here’s the issue I observe: I have longstanding automations with webhook steps that function reliably using the USERSETTINGS function in the JSON body. However, when I have more recently created automations using that same technique I receive an error in the app editor like the one in the OP. Seemingly in conjunction with the support case I opened regarding this problem, the Call a webhook from an automation - AppSheet Help article was recently updated to note “Do not specify [USERSETTINGS()](https://support.google.com/appsheet/answer/10108291) in the JSON body of a webhook task. It is not supported at this time.”. Does that caveat match your understanding of the functionality?

Is your understanding that this technique should work? When I attempt to reference user settings in an automation using either USERSETTINGS() OR [_THISUSER] and it doesn’t work, the error I receive is always what appears in the OP’s last screenshot: “Unable to find column ‘_THISUSER’.”

1 Like

Other than json, I realized this misbehavior with Bots maybe two weeks ago and I raised this with devs. When using webhook, you can specify the Usersetting value with the json properties.. that works.

1 Like

Yes, that works when specifying a literal value. What is unreliable is specifying a value for a UserSettings property in the JSON when that value is calculated dynamically using the USERSETTINGS function.

I’m glad to know they heard the problem articulated by you as well.

1 Like

At least this works..

“UserSettings”: {
“Restaurant”: “<<ANY(_Per User Settings[Restaurant])>>”
},
“RunAsUserEmail”: “<<USEREMAIL()>>”,
}

2 Likes

Thanks for the lead. Will explore.

You’re welcome!

Yes thats a more detailed explainantion of what I meant. But given the error message, the only logical cause to me was for it to be a scheduled bot.

1 Like

If only AppSheet behavior were always dependably logical!

1 Like

Thanks for the responses. I was only trying to get it work through actions, and not automations. Also I have never utilised user settings, so I am not familiar with what next steps to take. Could you please give me an indication of where I should try what?

Enable the column’s Show property.

Thanks again, @AleksiAlkio . I confirmed your technique works.

1 Like