Hi, I have usernames list in a field. I want to make view selection if loggined username exist in the list. I am using @SetViewinfo but it’s not giving me the required result. Can we use this function to search in a list???
I used this function to search on single value it’s worked fine. but with list it’s giving me the problem.
Regards,
Subject: RE: @SetViewInfo problem! Urgent
If your problem is so urgent, you could provide a little more detail about what you’re doing, which would save you a day or two of people asking for those details and you responding.
How is the view sorted? Is it categorized, or does it show multiple entries on separate rows? I believe it will have to be categorized by the multivalue field you’re trying to search.
Subject: RE: @SetViewInfo problem! Urgent
I have categorized a column on multivalue field but still it’s not giving me the required result. my setviewinfo formula is following:
@SetViewInfo([SetViewFilter];@Name([Abbreviate];@UserName);
ApprovedUser;1)
Approveduser is a name of a multivalued field.
Subject: RE: @SetViewInfo problem! Urgent
Look at the examples for @SetViewInfo. First, you don’t supply a field name, but a column programmatic name. Generally that will be the same as the field name, when the column displays only that field. Second, the column programmatic name should be in quotes.
Subject: RE: @SetViewInfo problem! Urgent
Thanx for you reply. I have also tried column programatic name but it’s also not giving the required result. Actually I have a “Allow multiple values” field in which values are comma separated.I have made the column categoized and explode it on a comma. here’s my code:
column formula:
@Explode(CurrentUser;“,”)
@setviewinfo formula:
@SetViewInfo([SetViewFilter];@Name([Abbreviate];@UserName);@Explode(CurrentUser;“,”);1)
Any suggestions??
Regards,
Subject: RE: @SetViewInfo problem! Urgent
All right.
If a field is already multivalued, you don’t need to use @Explode in the column formula. The value is already “exploded” and you just have to use the field name. Instead of @Explode(CurrentUser;“,”), the column formula should just be CurrentUser.
The @SetViewInfo command’s third argument is the programmatic name of the column you want to select on, in quotes. You used the formula of the column, which is not correct.
Look for the programmatic name of the column in the advanced tab of the column properties dialog. If the column value is calculated by a formula, it will typically be of the form $n where n is a number. If the column just refers to a field, it will typically be the name of the field. I say typically because you can change the column programmatic name if you wish.
So, if the column programmatic name is $7, here’s your formula:
@SetViewInfo([SetViewFilter];@Name([Abbreviate];@UserName); “$7”;1)