i have set up a rule for a field in a content editor:
‘Conditional: sys_communityid NOT LIKE 1052’
However, this doesnt seem to be working. I followed the steps from the implementation guide so does anyone have any tips?
i have set up a rule for a field in a content editor:
‘Conditional: sys_communityid NOT LIKE 1052’
However, this doesnt seem to be working. I followed the steps from the implementation guide so does anyone have any tips?
Hi Lisa
The sys_communityid is not a HTML parameter when initially adding a content item so it wont work.
You have to use PSXUserContent/User/SessionObject/sys_community, and I wouldn’t use the NOT LIKE operator I would tend to go for != instead.
LIKE and NOT LIKE are used when searching on part of a string eg
displaytitle LIKE ‘%34%’ will find ‘123456’
Cheers
James
Great thanx for the reply - yes i tried to insert ‘!=’ as it wasn’t an option in the list but couldnt so thought i’d try the ‘not like’. Do you know why ‘!=’ doesnt appear as an option?
Thanks in advance
I also just tried
Conditional:PSXUserContent/User/SessionObject/sys_community = 1095
and it now hides the field from all communities!
Hi Lisa
Try using “<>” instead.
Cheers
James
sorry, i was putting sys_communityid as opposed to sys_community so it is now working. The only thing left is the ‘!=’ operator which is not an option for me.
Hi Lisa
It seems that you get the “<>” operator when creating conditional statements but when creating a prerequisite for a validation statement you get “!=”.
Any reason for this Percussion?
Cheers
James
I tried using “<>” but still no luck.
Hi Lisa
Which version of Rhythmyx are you using?
Also a visibility rule only works if the condition matches false. What’s your required behaviour? Are you trying to hide from one community OR all but one community?
I’ve tried this on 6.5.2 and 6.7 and I get the expected results eg the field is hidden if I go into any other community apart from the one in the conditional statement.
Cheers
James
I am trying to make it visible to all but two communities. We are using version 6.5.2
file attached
Hi Lisa
The reason why it’s not working is because the boolean operator between the two statement needs to be AND.
If you do an OR then the whole statement will return true eg
Logged in community: 1000
sys_community <> 1052 OR #true
sys_community <> 1095 #true
return: true
Logged in community: 1052
sys_community <> 1052 OR #false
sys_community <> 1095 #true
return: true
Logged in community: 1095
sys_community <> 1052 OR #true
sys_community <> 1095 #false
return: true
Logged in community: 1095
sys_community <> 1052 AND #true
sys_community <> 1095 #false
return: false, because of the AND both statements have to match
Hope this helps.
Cheers
James
Super - works a treat. Thanks for your help!