display portal username in WAB application

203
2
Jump to solution
04-27-2018 01:20 PM
esriuser2
New Contributor II

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 Honored 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 Honored 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