Select to view content in your preferred language

display portal username in WAB application

442
2
Jump to solution
04-27-2018 01:20 PM
esriuser2
Emerging Contributor

I want to get the usernames for the portal userid's that I am displaying in my simple table in WAB application. Any ideas?

Thank you!

0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

This is how I set a text box (ownername) to the user's name (using the class 'jimu/portalUtils')

this._portal = portalUtils.getPortal(this.appConfig.portalUrl);
this.ownerName.set('value', this._portal.user.username);

View solution in original post

2 Replies
KenBuja
MVP Esteemed Contributor

This is how I set a text box (ownername) to the user's name (using the class 'jimu/portalUtils')

this._portal = portalUtils.getPortal(this.appConfig.portalUrl);
this.ownerName.set('value', this._portal.user.username);
BenjaminLedos
New Contributor

where should I put these lines of code to see the username?

0 Kudos