Having trouble accessing user data from fields

Hi forums,

I am currently developing a plugin. I am trying build a feature where a developer can provide a list of user emails to a field. My plugin will have three fields, viewer, editor & facilitator. I would like developers to choose which users will have access to different features.

My database contains five users, however, when I write this

let viewers = properties.viewers.get(0, 4);
console.log(viewers)

I only get the current user’s email. Why is this the case? What am I doing wrong?

Thank you so much,

-Jonah

Can you share your plugins settings and your settings into your test app?

1 Like

Capture

This is the experession inside the app. The data given is a list of texts.

The field is dynamic value, of type text (list of texts). This should match up, but I only get this:

cap2

Why is there only one entry inside the array? I am confused …

update:

properties.viewers.length()

gives length of 1. How is this possible? There are 5 users in the database…

Are you sure the privacy setting or search filter doesnt rstrict result? Inspect in debug.mode to see what the search return

You were right, it had to do with privacy rules on who can search for and view data!

1 Like