Absent Member.. Madhu84 Absent Member..
Absent Member..
763 views

Visiblity condition in Form

Jump to solution

Hi Experts,

 

We have a requirment of setting editablecondition in the form only for a particular field in the form which should be edidate for some set of users and for the other users it should be read only.

 

1. Created capablity word and defined the same in operator profile.

2.Fc- Add/Update/Diplay/Initial- current.phase in $file="Phase3"

Calculataion :if (index("test1", $lo.ucapex)>0) then ($G.test1="true") else ($G.test1="false")

 

form designer: read only condition : [$G.test1]="false"

 

Still doesnt work , please suggest how to acheive this .

0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.. Enzo_Potenza Honored Contributor..
Honored Contributor..

Re: Visiblity condition in Form

Jump to solution

fc calculation

 

if (index("test1", $lo.ucapex)>0) then ($G.test1=true) else ($G.test1=false)

true/false without ""

 

in fd...visible condition [$G.test1]

8 Replies
Absent Member.. uhyo Absent Member..
Absent Member..

Re: Visiblity condition in Form

Jump to solution

Why did you try global valiable?

Have you ever tried thread valiable($hogehoge).

Regards.

Micro Focus Expert
Micro Focus Expert

Re: Visiblity condition in Form

Jump to solution

In your formatcontrol you set the value of global variable $G.test1 only for condition

    current.phase in $file="Phase3"

If the current phase has a different value, you need to set a default for the global variable $.G.test1 in your formatcontrol "Initialization Expressions", for example:

   $G.test1="false"

Additionally you can test your functionality with RAD Debugger (available in Windows client). The operator needs capability word "Debug" to be able to use RAD Debugger. Call RAD Debugger via Window - Show View - Other - HP Service Manager Administrator - RAD debugger

In that RAD debugger you can display the value of your variable with this command:

d $G.test1

I hope that helps.

Best regards,

Heike

 

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Absent Member.. Madhu84 Absent Member..
Absent Member..

Re: Visiblity condition in Form

Jump to solution

 

 

Hi,

Thank you for your suggestion, but the field will be editable for a certain set of users only in phase 3 and after phase 3 the fields will go as read only and none can edit the fields.

 

fc: intial expression :  $G.test1="false"

calculation: i give if (index("test1", $lo.ucapex)>0) then ($G.test1="true") else ($G.test1="false")

 

When i try rad debugger for d $G.test1 the value is NULL

0 Likes
Absent Member.. Madhu84 Absent Member..
Absent Member..

Re: Visiblity condition in Form

Jump to solution

Hi,

 

Indeed tried local variable as $test1 , still no go.

0 Likes
Micro Focus Expert
Micro Focus Expert

Re: Visiblity condition in Form

Jump to solution

If you set

$test1="false"

in initialization expression of your formatcontrol, you should be able to see value "false" in RAD debugger.

I tested with formatcontrol "contacts":

1. add Initialization Expressions    $test1="false"

2. open a contacts record

3. open RAD debugger     d $test1      and it shows me "false" as value.

Are you sure you use the correct formatcontrol where you set the initialization value ?

Thank you for using the MicroFocus ServiceManager Support and News Forum. If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
Highlighted
Honored Contributor.. Enzo_Potenza Honored Contributor..
Honored Contributor..

Re: Visiblity condition in Form

Jump to solution

fc calculation

 

if (index("test1", $lo.ucapex)>0) then ($G.test1=true) else ($G.test1=false)

true/false without ""

 

in fd...visible condition [$G.test1]

Absent Member.. Madhu84 Absent Member..
Absent Member..

Re: Visiblity condition in Form

Jump to solution

Hi,

I tried the same in fc and fd but still no go, i have tried in cm3r fc calculation.

 

initial: true

calculation:if (index("SysAdmin", $lo.ucapex)>0 or index("$G.test1", $lo.ucapex)>0) then ($G.test1=true) else ($G.test1=false)

fd: [$G.test1]

 

 

0 Likes
Absent Member.. Madhu84 Absent Member..
Absent Member..

Re: Visiblity condition in Form

Jump to solution

Hi,

 

I gave the same in intialization in master format ctrl cm3r and the rad debugger shows null. we are using process designer , can it be a reason for value not populating. In object record cm3r is the master format ctrl defined.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.