Developer forum

Forum » CMS - Standard features » User Smart search, filter by field not empty

User Smart search, filter by field not empty

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I need to create a UserSmart search that will include all user that have any value for a specific field. I see that I can use IsEmpty, but I don't see anywhere NotEmpty.

Is there a negation I am missing?

Also, I need to know if I can use the above SmartSearch in discount, Permissions or Assortments.

I am using 9.2.14

Thank you,

Adrian


Replies

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

Can you use "Is Not" with an empty value?

BR

Martin

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Martin,

I tried IsNot with empty field, I also tried IsNot with '' but both options return a different set of results than what I expect.

Probably because some Users have Null for Department instead of Empty.

Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Yup.

That's it. During the import, the Department field was filled with Null instead of empty.

Maybe that's something that needs to be handle in the Table definition as a default value. probably for other fields as well. This way you can avoid having other people like myself posting useless questions :)

What about my other questions?

Thanks,

Adrian

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

I don't think you're asking usless questions. :)

I think the correct way to handle this, is to add "Not Empty" to the dropdown, instead of changing the imported data. I've create a bug for this (TFS 36355).

Regarding SmartSearch in Discount, Permissions or Assortments: No, you cannot use it here. You need to import the data into the correct grouping / structure instead.

If you really need this, we need to move the discussion over to the feature requests.

BR

Martin

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Martin,

Thank you for your answers.

Yes, I really need to be able to use User Smart Searches in Assortments, Discounts and Permissions.

I believe I have created feature requests for all of the above at least one time in the past year. I thought they might have been already implemented since the request is not that strange.

If you think it is useful, you can open Feature requests for them on my behalf. Maybe if they are opened by you, will get more wieght in prioritization :)

Thank you,

Adrian

 
Martin Vang
Martin Vang
Reply

Hi Adrian,

I personally think that this isn't anything I would want to use. I would much perfer to make this the job of the import-job; An external data-owner should provide the configuration for what discounts, permissions and assortments an user has access to, if you ask me.

I will forward your request to the product owner, though. Maybe I'm just being a bit too rigid; I'll let them decide. :)

BR

Martin

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Martin,
That is correct with a few comments:

1. Using UserGroups instead of Smart Search is less flexible. UserSmart Search is a great tool if it has a use. So far, I cannot find any use for it if it can't be accessed in the above mentioned areas.

2. Not all solutions use Integration to assign users to groups.

3. Even if you use integration, if you use Group association will put a terrible load on the AccessUSer table. First as number of rows, then as number of values that can be stored in the Groups field. The Groups field is limited to 255 characters. Assuming each group allocation will take 6 fields, a user can only be assigned to maximum 42 groups. This number is pretty small if you have a very segmented user database.

4. USerSmart Search is supposed to use indexing for building the lists, which should probably make accessing the UserGroup content more performant.

That's my 2 cents (or more) on the subject.I hope you guys will see it as a constructive approach and not as a criticism :)

Thank you,

Adrian

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Adrian

The SmartSearch "Is not empty" option has been added to Package "Dynamicweb.SmartSearch" version 1.1.1

You are able to find this update in the backend Package update section.

Also this are part of the 9.3 release 

You are able to find this build in the download section:

http://doc.dynamicweb.com/releases-and-downloads/releases

Please contact Dynamicweb Support if you need any additional help regarding this.

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

You must be logged in to post in the forum