User can navigate to previous step and see content
Hello, Im looking for a solution to this issue: In a flow, user 1 fills in a form. Most of the form is in sections assigned to the user's role. But there is a message control that is not. User 2 access step 2 that uses information from step1 in a different form. User 2 can click the previous step in the navigation control. Since most of the controls in step 1 are in sections the user cant see them and thats good, but they can see the label and the submit button.
1. Is there a best practice to keep users from backing into previous steps? (prefer to keep the navigation)
2. Is there a _data.getparameter option that could be used to get all the roles of the current user? Or other method to determine the roles of the current user? ie. loop though the user's roles to see if they are a member of a specific role and then enable/disable controls on the form.
3. Putting the control (message) in a section can work but its not aesthetically pleasing. Possible to hide the section label and outline while displaying the message inside of it?
Thanks
-
I found this in the help. I'll give this a try. But what is in the var 'roles'? It seems like 'x' is a array, are the values a simple list or are they pairs of values (a=A)?
var x;
var
roles = _data.getParameter (
"subject.roles"
);
if
(roles) {
eval (
'x='
+ roles);
Roles.options = x;
0 -
Hi Jeff,
- You can disable the Navigation toolbar in that flow if you do not need it. Please see this documentation about Navigation property in flows.
- You can use business rules to get current user's roles. Please see this example rule which shows how to get all roles for current user in an array.
- Unfortunately, I can't think of any way to hide the section label and outline.
Hope that helps.
Thanks,
Prajakta
0 -
Variable 'roles' in that example is storing the JSON array results which the
_data.getParameter (
"subject.roles"
)
method returns. And variable 'x' contains the results from that JSON array converted to a JavaScript array.Thanks,
Prajakta
0 -
Great, I can work with that. Thanks
0
Please sign in to leave a comment.
Comments
4 comments