Developer forum

Forum » CMS - Standard features » User smart search: using expressions

User smart search: using expressions

Martin Christensen
Reply

Hey,

when creating a smart search for users, selecting certain fields allows you to enter an expression as part of the condition.

I haven't been able to find any documentation for this - how can we utilize this? Is it a regexp, what variables are available? Should it be structured in a specific way?

It is available for the field 'Group', possibly others.

 

My specific problem is that I need to find all users that are members of only one specific group and no other groups. I could just create a rule for each of the remaining groups (that the user may not be a member of each of them), but this requires adding a rule whenever a new group is created. I figured we might be able to do this using an expression, but I'm also open to other suggestions or approaches I haven't thought of :)

Thanks!

Best regards

Martin


Replies

 
Nicolai Pedersen
Reply

Hi Martin

Take a look at this post in the old manual: http://manual.dynamicweb-cms.com/Default.aspx?ID=7570

It contains information on expressions.

 
Martin Christensen
Reply

Thanks for the quick reply! That answers my question about the expressions.

Is there any way to configure the smart search, that I mentioned? Users only in one specific group.

 
Nicolai Pedersen
Reply

You could try the expression @Code("@123@") where 123 is the ID of the group on the group field.

 
Davy Capiau
Reply

Hi,

Is there a new link of the expressions manual that works?

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Seems like it is currently undocumented.

More info on some forum threads - i.e. like this one:

https://doc.dynamicweb.com/forum/ecommerce-standard-features/ecommerce-standard-features/smart-search-with-value-from-item-field

 

You must be logged in to post in the forum