Project and Portfolio Management Practitioners Forum
cancel

How to make field visble / Not visible depend on other value.

Highlighted
prabu.karunanit
Respected Contributor.

How to make field visble / Not visible depend on other value.

Hi,

I have four fields ( Auto complete list) when i complete selecting the fourth field a hidden field will populate (True / False ) , Depending on the flag true / false i need to show another feild .

If the hidden value is true i need to show one feild , if it is false then i need to hide the feild.

Since there is no event for value changes, the rule is not working.

Is any other otion to fire this rule.

Thanks,
Prabu
19 REPLIES
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

Hi,
you need to create two rules (on field change) that have dependencies to the field(s) deciding the other field has to be set to true (rule 1) and to make the last field visible (rule 2).
For the second rule you need to set the "logic" to UIrules. Then you can click the ? to see the syntax like "setFieldRequired(true/false)".
Are you sure, you need the hidden true/false field?
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

HI,

I have done the same, But the rule 2 is not wokring since, there is no event occured when the value gets populated hence the rule is not working.

I need to make Visible when the Dummy field value becomes true or else , the field will be hidden only.


Thanks,
Prabu
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

That's why I asked if you still need the hidden field. If you set the hidden field with a rule, the rule changing the field will not trigger a rule depending on it. The event "user changes field" does not happen in this case, so the 3rd field stays hidden. The field you want to show must be dependant on a visible field. So the event you use to set your dummy field to true should directly un-hide your third field.
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

ok, but if i make the dummy field as visible field also the rule is not firing.
In this case is there any other way to goahead.??
Mahen M
Acclaimed Contributor.

Re: How to make field visble / Not visible depend on other value.

Instead of hiding the field, give the security of the field as Visible only to 'ITG Adminstrator' Security Group or anyother security group and try.

Regards,
Mahendran M
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

Well, I will explain in detail , i have one feild ( sample1- Auto Complete List) , when i select the value of that field , a dummy field will get populated as true / False (according to the value Sample 1).

When it get populated , I need to check if the Dummy is true i need to show another feild ( Sample 2) or else i need to hide the hide the field (sample 2).

No issues if i want to make the Dummy field visible in the front end.


Mahen M
Acclaimed Contributor.

Re: How to make field visble / Not visible depend on other value.

If you make your Dummy field(Which contain 'True' and 'False') visible, then the rule is firing on 'Sample 2' field?

If Yes,
You can make your Dummy field(Which contain 'True' and 'False') visible to ITG Admistrator alone, As shown in snap, so that this dummy field is not visible to end user.


If No,
I am not sure, I don't have 7.5 Instance now.

Regards,
Mahendran M
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

But how will you write a rule on the dummy Field which is visible in the front end and there is no event occured on it.
the field will jus get populated true / false.

There is no event occurs for it, hence when i place the dummy field in dependency field and event set as on Feild change and the result field will the sample2 field will not work.
Mahen M
Acclaimed Contributor.

Re: How to make field visble / Not visible depend on other value.

I am not able to picturize it correctly, I have worked on 7.5 but as of now I don't have 7.5 instance in my area.

I am sorry.

Regards,
Mahendran M
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

If you want to have the dummy field to have any effect on sample2 you will need to set the dummy field manually.
If you want to unhide sample2 based on the selection in dummy one use a rule dependent on sample1 with the same dependency you use to populate the dummy field now. This rule then does not need any SQL; select UI-Rule as the type and use the appropriate JavaScript function (see ? for help)
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

Hi Can you please tell me which event you firing the rule (On feild change / On Creation ) , since your attachement shows in different language.
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

it's on field change and the condition was "when prio set to high" then setFieldVisible(true) and in the bottom left which field to un-hide (may be more than one).
btw. you will want to have a second rule that hides the field again, if sample1 is changed again.
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

for your information , the dummy field is not manually changing, It is auto populated.
Once the value is populated as true i need to show the sample 2 field or if the dummy field is false then i need to hide the sample 2.

No where manual change on dummy field , basically it is a ready only field.
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

I understood that, just if the dummy field is changed by a rule, rules of the dummy field are not triggered.
There are two options:
1. You edit the dummy field manually, so that sample 2 is unhidden
2. You have a rule on sample1 that unhides sample 2

That's why I asked if you really need a dummy field in the first place.
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

Yeah, I need the Dummy Field , not that one we are not manually changing . Reason behind that is we have more than 800 values in the Sample 1 feild which is mapped to the dummy feild.

So when sample 1 changes , the dummy field get populated and depend on the value of the dummy feild i need to show / hide the sample 2 field.
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

So the issue would be that the dependencies you can define in a rule are only basic one (larger than, equal to etc.) and that will not help you in the situation, right?
Then the UI-Rules will be difficult to use. You could have another field that the user fills out later than sample1 and the UI-Rule (with dependency on the dummy field).
Or, like we would have done before this type of rule existed, have a execution step in the workflow based on the dummy field and an additional step/status where the sample2 is visible and mandatory.
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

Hi,

Making a execution step is good one, but we need it in the not submitted step..

and we are not manually changing the dummy step..

Hence forth the rule is not firing...

any other work around for this..??

Thanks,
Prabu
Sascha Mohr_1
Outstanding Contributor.

Re: How to make field visble / Not visible depend on other value.

I cannot think of one as there are only two ways of setting hide/unhide for fields: status dependencies and UI rules.
prabu.karunanit
Respected Contributor.

Re: How to make field visble / Not visible depend on other value.

Any way.. Thanks for your ideas that you given.... i will close this thread with this..

Thanks for all..