getLocation returns an empty value

Ludwig Tor_ge
Tera Contributor

Hi,

Basically I'm trying to create a list of incidents inside our customer portal where the user should be able to see all incidents reported by the user or reported on that location.

So I'm using the widget Data Table from Instance, and I have tried with filter below:

u_custom_state<5^u_customer_contact=javascript:gs.getUserDisplayName()^ORlocation=javascript:getUser().getLocation()

It suceed to get the users display name, however the location remains empty. Why?

Do you have any suggestions?

 

Best regards

Ludwig

4 REPLIES 4

Shambhu5
Kilo Guru

Hi Ludwig,

In your filter please try below parameter: 

u_custom_state<5^u_customer_contact=javascript:gs.getUserDisplayName()^ORlocation=javascript:gs.getUser().getLocation() (you might forgot to add gs in argument)

OR

for location filter you can also try ...ORlocation=javascript:gs.getUser().getRecord().getValue('location').

Hope this helps!

Please mark my answer as Correct/Helpful if that helped you anyhow.

Regards.
Vishrut
find_real_file.png

Hi,

No one of those works.

 

u_custom_state<5^u_customer_contact=javascript:gs.getUserDisplayName()^ORlocation=javascript:gs.getUser().getLocation = empty

 

...ORlocation=javascript:gs.getUser().getRecord().getValue('location'). = Illegal access to method getRecord() in class com.glide.sys.User

 

Best Regards

 

Ludwig

Hi Ludwig,

If this task is on that much priority, then just go with Client Script, on both onChange & onLoad.

That will reduce your time of Brainstorming on this particular issue.

- Vishrut

VS9
Mega Contributor

Can you try user.location.getDisplayValue();