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-navig...

2023-06-15 124631.png2023-06-15 124735.png2023-06-15 124755.png

 

0 13 381
13 REPLIES 13

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])?

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.


@Simon_Robinson wrote:

because this is a bot, its operating without login information


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() in the JSON body of a webhook task. It is not supported at this time.". Does that caveat match your understanding of the functionality?


@AleksiAlkio wrote:

ANY(_Per User Settings[CSVLocale])


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'."

 

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.


@AleksiAlkio wrote:

When using webhook, you can specify the Usersetting value with the json properties.. that works.


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.

At least this works..

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

Thanks for the lead. Will explore.

You're welcome!

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


@dbaum wrote:

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.


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.

If only AppSheet behavior were always dependably logical!

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?


@Quality_Assuran wrote:

2023-06-15 124631.png


Enable the column's Show property.

Top Labels in this Space