plasmagrid
Nintex Newbie

Re: Form Field not updating

Jump to solution

If I implied that, I am sorry.I need to have the choice options update but need to remove "escalation" option if you are not a member of said group

So my perception is that I can not  have two panels and to separate choice controls linked to the same list column?

Is this something that can only be done by Javascript?

If so I tried doing Leif's article and just not getting something correct then.

Nintex Forms: How to disable or hide option in Choice control? 

I even looked at Dynamic Choices: Nintex Forms — inFormed .

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: Form Field not updating

Jump to solution

So my perception is that I can not  have two panels and to separate choice controls linked to the same list column?

exactly, no more the one control should be connected to list field.

Is this something that can only be done by Javascript?

yes, usually this done with javascript.

but your requirement is very simple and is manageable with pure CSS.

try following

- add following CSS definition into form settings >> Custom CSS (or any custom CSS file that you include to form)

.IssuTypeOptions_Hide3rd .nf-associated-control tr:nth-of-type(3) {
    display: none;
}

- configure formula like following one for 'CSS class' of choice control

fn-If(fn-IsMemberOfGroup('SP.TestGroup'),"","IssuTypeOptions_Hide3rd")

and that's it.

this is how it renders for group memebers

and for not members

View solution in original post

Reply
plasmagrid
Nintex Newbie

Re: Form Field not updating

Jump to solution

Marian Hatala‌,

Since I already have a CSS class being used, TabsChoiceControl, then would I just add it to the CSS script in place,

by adding to .TabsChoiceControl tr, or should it be separate as you have and how would I reference multiple CSS from CSS class?

tr:nth-of-type(3) {
    display: none;
}

Current script already in place:

.TabsChoiceControl {
float: left;
}
.TabsChoiceControl tr {
float:left;
}
.TabsChoiceControl label {
background: #fff;
padding: 8px 6px;
border: 1px solid #ccc;
margin-left: -1px;
position: relative;
left: 1px;
border-radius:5px 5px 0px 0px;
cursor:pointer;
border-bottom:none;
text-align:center;
color: #000;
}
.TabsChoiceControl [type=radio] {
display: none;
}

ChoiceControl02

0 Kudos
Reply
emha
Automation Master
Automation Master

Re: Form Field not updating

Jump to solution

you can configure as many classes for a control as you like. just separate them with a space within CSS class field.

to use existing class or to create one another is moreless up to you and usage of existing class. if existing class is used for several controls and/or purposes you might want to create new dedicated class.

0 Kudos
Reply
plasmagrid
Nintex Newbie

Re: Form Field not updating

Jump to solution

I implemented this in the orginal form and when it still did not work I created a new form with only the a choice option like you have, trying to duplicate right down to all settings on the choice action from your picture, figuring if I can get it to work with only the option I should be able to port it to the proper form. The sample form with only option is not working either. So I am obviously messing something up. I inserted the the CSS code in the Custom CSS. When I insert the code for CSS class I have tried your orginal and substituting the SP.TestGroup with Internal User. I have also tried using double quotes instead of single quotes because of the space in the group name, but to no avail.

Various forms I have played with:

fn-If(fn-IsMemberOfGroup('Internal User'),"","IssuTypeOptions_Hide3rd"
fn-If(fn-IsMemberOfGroup("Internal User"),"","IssuTypeOptions_Hide3rd"
!fn-If(fn-IsMemberOfGroup('Internal User'),"","IssuTypeOptions_Hide3rd"
fn-If(!fn-IsMemberOfGroup('Internal User'),"","IssuTypeOptions_Hide3rd"



0 Kudos
Reply
emha
Automation Master
Automation Master

Re: Form Field not updating

Jump to solution

is 'Internal User' valid sharepoint group?

fn-IsMemberOfGroup expects as an argument a sharepoint group name against which it check mebership of current user.

you are missing closing brace for fnIf() at the very end of your formulas, but I guess it's just a copy&paste mistake...

0 Kudos
Reply
plasmagrid
Nintex Newbie

Re: Form Field not updating

Jump to solution

It is a SharePoint, not native, but one that was create previously and I am using it.

It was a copy & paste mistake as I went back to validate the CSS class and it is showing the brackets

fn-If(fn-IsMemberOfGroup('Internal User'),"","IssuTypeOptions_Hide3rd")

Am I to understand the break down of the scripts is:

If(fn-IsMemberOfGroup('Internal User'),"","IssuTypeOptions_Hide3rd")

If member of group('Group')  , "do nothing"," else hide 3rd option"

**update**

I played around and if I only put the CSS class as "IssuTypeOptions_Hide3rd" in the the css class it does hide, so that confirms the script, which I had no doubt works.

I then removed the class and set a rule of fn-IsMemberOfGroup('Internal User) on the CHoice action and it infact was hidden, so that rules out the Member Group as being an issue. So why is the complete formula not working on the CSS Class?

**Update**

So I started to play around with the formula and seems like my SharePoint does not like If function, fail, pass

I had to reverse the pass/fail parameters and it worked successfully.

fn-If(fn-IsMemberOfGroup("Internal User"), "IssuTypeOptions_Hide3rd","")

THANK YOU very much

Reply