You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have a field that its type is "user (multi-select)" and I want to set a filter (or condition) on another field (For example, IF Match view helper) that if current logged in user is one of the users I define on the user multi-select field, sth happened (For example show sth). How could I set the filter?
Checking the field agains the current user available in the context https://wiki.vertuna.com/display/CONFIFORMS/Accessing+field+values+and+properties#Accessingfieldvaluesandproperties-Additionalvaluesavailableinthecontext
Check more on ConfiForms filters here https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Filters
! defines NOT in the filter
will check if the user not exists in the multi-select user field
I ask because I test this before and I couldn't succeed. So let's explain more. I have a field named "Authorized_Users" that save multiple users like "A, B, C, ..." and I have a variable like X that every time changed (for example it is the current logged in user).
I want to set a condition that if X (that is current logged-in user or "_user") exist in Authorized_Users, show something. For this situation, I found nothing in your filter examples.
I can write filter in 2 ways:
1. Authorized_Users:[entry._user] > In this way [entry._user] is the user that submit the form, not logged-in user
2. _user:[entry.Authorized_Users] > in this way the output is sth like this: X:A,B,C
and this filter is wrong. Because 1 value couldn't be equal to 3 value! So here I should have sth like "IN" and "NOT IN" filter to use instead of ":" to search in multi-values fields, or ":" should work as a "search" function, not only "equal" comparison.
I hoe I had explain clearly.
Well, ConfiForms is smart enough to understand what type of field it is checked against and for multi-value fields it does automatically "contains"
Screencast to illustrate what I was saying...
And as I have said earlier you can create a view to list rows that dont contain current user in a field
You mean that these conditions both return "TRUE" ?
I ask because it didn't work for me.
I explain again. One side of my filter is "_user" that return current logged-in user that are viewing the page
other side is [entry.authorizedusers] that its output is sth like "user1,user2" that is authorized to view the contents in IFMatches macro
But when I write _user:[entry.authorizedusers], it didn't work.
Another question; Is it different between _user:[entry.authorizedusers] AND [entry.authorizedusers]:_user ?
No, I have not said that.. and neither the _user:[entry.authorizedusers] AND [entry.authorizedusers]:_user makes much sense (really, does not make sense at all)
Please see HOW I use the filters... there is a screencast that shows you that... I also put examples... why do you switch over to something else!? I cannot understand that
Because I don't want the user who fill the form. I want to filter another users that defined in another field and compare them with the user who are viewing the page.
[entry._user] is the user who submit the form and its username is "X". While submitting the page, there is a field (authorized_users) that automatically filled and assign some users (Like A & B) from another form depending on category that user X select. When form submitted, a page is created and another user with username "Y" is viewing the page. I want that if "Y" is one the users that had assigned in authorized_users field, see some text or some fields. So I can't use [entry._user], because this is the user who filled the form, not the one who is viewing the page! Is it true? If yes, so multiuser:[entry._user] couldn't be correct filter for this situation.
[entry._user] variable holds the user who is currently logged in
It is documented in the link I have shared with you in my initial reply https://wiki.vertuna.com/display/CONFIFORMS/Accessing+field+values+and+properties#Accessingfieldvaluesandproperties-Additionalvaluesavailableinthecontext
I Have a IFTTT form that create page on submitting form. In created page there is an "IFMatches View Helper" macro that it's condition is sth like this:
That means if logged-in user is a member of "A_Multiuser_Field" then that user can see some texts.
But when page created, [entry._user] has changed to the userrname of form submitter and I cannot trigger the logged-in user in condition field. Could you help me how could I trigger logged-in user without [entry._user] or do sth to prevent changing [entry._user] to creator of record and page and this field remain without changes. Thanks
That is because the [entry.field_name] notations are evaluated in your templates against the current record's data
To bypass/workaround this, you need to use asEntryRef virtual function