- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hello everyone,
I'm trying to create a header in my new Workspace page and i would like to show the name of the current logged user in this header.
I tried to create a client state and client script:
And apply this in my header:
But the header is null (blank). I literally copy this process from the Business Continuity Workspace, but in my its not working.
Anyone can help me with this?
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've got this working in my PDI. I had to change the client script to match the documentation rather than an example in the platform.
Here is my example client script:
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
* @Param {any} params.imports
* @Param {ApiHelpers} params.helpers
*/
function handler({
api,
event,
helpers,
imports
}) {
helpers.translate('Hello, {0}!', api.context.session.user.fullName)
.then((translatedText) => {
api.setState('headerTitle', translatedText);
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I've got this working in my PDI. I had to change the client script to match the documentation rather than an example in the platform.
Here is my example client script:
/**
* @Param {params} params
* @Param {api} params.api
* @Param {any} params.event
* @Param {any} params.imports
* @Param {ApiHelpers} params.helpers
*/
function handler({
api,
event,
helpers,
imports
}) {
helpers.translate('Hello, {0}!', api.context.session.user.fullName)
.then((translatedText) => {
api.setState('headerTitle', translatedText);
});
}
