on 02-17-2015 10:50 AM
Can we change image dynamically in any flavour based on user login in SAP Screen Personas 2.0 ?
Not sure what the use case would be for something like this, but I suppose you could add an HTML viewer to the page covering the whole canvas, and change the URL to an image that is different depending on a user.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With a script that is tied to the OnCreateHandler event of the screen.
You'd have to code the logic deciding which URL you want for what user.
You'll have to figure out the current user name which is available by navigating to System -> Status. Alternatively, you could write a WebRFC taking care of the logic of user determination and maybe even building the URL..
Hi,
Thanks for the reply...
I have gone through the links and tried it out with but, 'On Create Handler' option is not available.
Also if we can change the status of the button (for eg. hide/unhide), can we change a image of the flavor in a background depending on the user login details using scripting?
Awaiting for your valuable reply...
You have to select the User Area to access the OnCreateHandler for the page:
Dynamic hiding of controls is not a standard provided feature in Personas 2.0. There is a way to do it (with some caveats) but this wouldn't help you in your original use case of changing the background picture anyway. The solution can be found here in this same SCN space if you're interested in this.
As I mentioned earlier, it is possible to do what you're looking for but you have to know basic scripting and/or WebRFC coding to make it happen. However, it is NOT possible to swap out the assigned background picture with scripting.
If you go down the HTML viewer route, first you'd have to find out how to make the decision about what picture is needed for which user. And I'm still not clear why would you want to do something like this in the first place
In general, you don't have access to controls' properties via scripting in Personas 2.0.
However, in this case, you can change the URL of the image that you are assigning to the HTML viewer covering the area where you want the image to show up.
Do this:
This will make the image dynamic, depending on the URL you specify.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.