We can access the user settings column directly by bracket notation (e.g [my setting]) in another table but if it's a reference, we cannot directly read its member. Wouldn't be an expected behavior?

A column in user settings can be read by

  • [my setting]
  • USERSETTINGS(“my setting”)

in another table.

If [my setting] is reference, I cannot read like [my setting].[id].
Note that there is no name conflict. I don’t have any column with named “my setting” in the current table.

Is it a bug?

0 15 595
15 REPLIES 15

TyAlevizos
Participant V

Yes, I just looked at this. I don’t think a USER SETTING field can or should reference arbitrary table references. But maybe? Curious as to what others think. But it does seem to work?

I can create (and show) a user setting field called “Option 1” which is of type “Ref” and points to a table in my app. I can then create a second user setting field called “Option 2” which is of type “text” and has a formula of:
[Option 1].[ColumnA]

(where ColumnA is in my referenced table. Perhaps it’s a typo or config change on your end?

Within user settings, it does work.

I mean in another table.

I updated the title and question to include that part.

Please post a screenshot of the expression you’re using in a user setting that does not work. Please also post a screenshot of the configuration for the user settings column of type Ref.

User Setting

Table

Expression in any text field of a table

Test result

Trying to read the references

Please post a screenshot of the ManyChat column edit screen.

Looks like it should work to me! I’m afraid I’m going to have to refer you to support@appsheet.com for more diagnosis.

I will just post it in internal support then. Thanks

@Steve, I still don’t get straight answer from support yet. Can you please help?

The replied I get was "The functionality you are trying to accomplish is not possible. "

As you said, it should work and looks like it’s a bug.

I tried using a Ref in a user setting and it worked for me. Perhaps I do not fully understand what you’re doing and so cannot see what’s wrong. My understanding is:

  • You have a user setting named ManyChat that is of type Ref with a source table of ManyChat Fields.

  • The initial value of the ManyChat user setting is FBFoodOrdering, which is presumably the key column value of an existing row in the ManyChat Fields table.

  • You attempted to set the ID user setting to the value of the ManyChat user setting using the expression, [ManyChat], which appears to test OK.

  • You then attempted to set the same ID user setting to the result of the expression, [ManyChat].[API Name], which produces an error.

Is that correct?

As I wrote this reply, I noticed this:
2X_3_3389e6d682ff92ccadff0825f363d1541ac51ee0.png

Note that at least one user setting must have Show? set to ON in order for user settings to work.

Note, too, that user settings have no value until the user accesses and saves them at least once by going to the main menu, choosing Settings, and saving the resulting form. This does not appear to be mentioned in the help doc…

It might also help if you could briefly explain what you’re trying to accomplish here.

Yes that’s correct.

I also suspected that the show might be an issue. So I turn on show and you could see it in the later screenshots. And I still could not read the [API Name].

I tried saving the settings with ManyChat column set as shown. Still could not call [ManyChat].[API Name].

There is a possible workaround as shown below but I have to add a virtual column in every table I like to have access to the setting.

What I am trying to do is having global variables. I know I could use User Settings but it’s limited to only 10 columns.

So instead I set a column of the user settings as reference. That column will reference a row that has all global variables I need.

So in individual tables, I was expected to be able to access the reference row via the user setting directly (e.g [ManyChat].[API Name])
With the workaround provided above, I am able to read the row indirectly.

I hope that it will make my use case clear. Please let me know if you have more questions.

Ah, no, you can’t do that. Outside of other user settings, you can only access user settings values with the USERSETTINGS() function.

AppSheet offers no inherent means for defining and using global variables. Most app creators with such needs resort to a dedicated table and access it like any other table.

Outside of other user settings, you can only access user settings values with the USERSETTINGS() function.

Actually, I could read it simply using [ManyChat] in any table. USERSETTING(“ManyChat”) is not requried. That’s why I created this question.

Anyway, there’s a workaround that I am happy with it. Thanks for the help.

Top Labels in this Space