Hiding Fields for Certain Users

I know Servoy uses a javascripting like language on the backend aswell as css, is there a way to use the css visibility property in the code. Say i have a user who doesnt have permissions to see a certain field, is that possible to do in the scripting?

thanks in advance.

Yes, but not using styles. You cannot apply a style on the fly (currently). However, you have access to all (named!) elements on a form by scripting, so you can use something like

forms.myForm.elements.aField.visible = false;

Hope this helps.

Plus you can use the built in security. By defining groups that cannot see a certain field, you should have the same result.

wow, i was planning on scripting the security and the fields they can view… is there documentation somewhere about how that security/groups thing works?

thanks patrick.

galexander:
wow, i was planning on scripting the security and the fields they can view… is there documentation somewhere about how that security/groups thing works?

thanks patrick.

Yes it’s in the standard documentation, both in the printed books and in the online (press F1) help.

couple of clicks and you can hide fields for certain users, make sure to fill the NAME property of fields if you want to hide them (can be done at placement of afterwards in its properties)