cucucucu
28th July 2004, 04:10
In a maintain session, I want to mask one field so that some people can read the value some people cannot read it. How can I do this? Anyone can help me? Thanks a lot!!!!!!!!!!!!!!!!!!!!!!!!!!!! :D

SriksAdi
28th July 2004, 06:23
Hi,
Try out inputfield.invisible().
This functions makes the field invisible.

Syntax
void inputfield.invisible( string field_name(18) [, string
field_name(18)]... )

Description
This hides the specified field(s) completely. In dynamic sessions, associated labels and dependent child fields are also hidden.
Note that when the predefined variable attr.echo is set to off, the field value is not displayed but the field itself remains visible.


regards
Sriks

juvenile
28th July 2004, 07:01
Hai cucucucu
Why dont u use field level authorizations??
I hope it suits to ur requirement?

rgds,
juvenile

juvenile
28th July 2004, 07:03
Extn to the earlier post
Look at Maintain Table Field Authorizations ttaad4133m000 .

cucucucu
28th July 2004, 07:21
Hi Juvenile, my boss don't want to use "Maintain Table Field authorization", so I must find out another way to realize it. Sigh!:(

cucucucu
28th July 2004, 07:29
Hi SriksAdi, thanks a lot! I will try it. :)

cucucucu
28th July 2004, 07:53
Hi SriksAdi,
I used it as below:
|************field section **********
field.tablefield:
before.field:
inputfield.invisible("tablefield")

|*******************************

This script can pass compile, but when I run the session, the bw message window poped up:
Function 'inutfield.visible'; Recursion not possible refcount=2

Could you please tell me what happened? Thanks a lot!

SriksAdi
28th July 2004, 08:03
Hi,
I believe before.field is not the right place to use the function inputfield.invisible().

Since your requirement is to hide the values at the user level, you can make the field invisible in before.program.

Try using it in before.program.


regards
Sriks

cucucucu
28th July 2004, 08:10
Yeah!!!Succeed!Many Many Many Many Many Many Many Many Many Many thanks for you! :) :)

juvenile
28th July 2004, 08:44
Now How you are restricting some users ???
If logname = XXX then
visible
else
invisible
endif
like this or any other way can u let me know??

SriksAdi
28th July 2004, 08:56
Hi,
Hardcoding of user names, for that matter any values, is most of the time not preferred.

A possible solution would be to create Customised User Groups. The groups could be Super User or Normal user (Not Baan User Type).

In the before.program of the session, check if the user logged in is a Super User (Super User in the customised user group) and accordingly make the field visible / invisible.

The user groups can be extended to multiple levels based on the requirements.


regards
Sriks

dorleta
28th July 2004, 09:09
perhaps of this way:

before.program:
if logname$=user1 then
inputfield.password("myfield") |user that must not see
endif

cucucucu
28th July 2004, 10:47
Now How you are restricting some users ???
If logname = XXX then
visible
else
invisible
endif
like this or any other way can u let me know??

I used the way mentioned by SriksAdi :p

cucucucu
28th July 2004, 10:51
perhaps of this way:

before.program:
if logname$=user1 then
inputfield.password("myfield") |user that must not see
endif

What's the function of "inputfield.password()"? Could you please give me more details? :confused:

SriksAdi
28th July 2004, 11:21
Hi,
The field value of the input field are displayed as asterisks (*), as if you are enteing the password.


Sriks

cucucucu
29th July 2004, 03:05
Oh, I see, thank you :)

suhas-mahajan
31st July 2004, 06:35
Hi Cucucucu,

Refer to - http://www.baanboard.com/baanboard/showthread.php?t=13375 for more info.

Regards,

-Suhas

cucucucu
31st July 2004, 07:48
Hi Cucucucu,

Refer to - http://www.baanboard.com/baanboard/showthread.php?t=13375 for more info.

Regards,

-Suhas
Thank you :)