When you set up Completeness on an EntityType you can have different approaches.
I’ve taken a very simple example, a Brand entity that needs a unique identifier and an image. It can also have a description but that is not needed for it to be published online.
Only setup mandatory fields
You can configure the Completness for the fields that is needed and discard all others, Description in my example.
You will be able to use this Query editor to get all complete brands that lacks description.
Setup different Completeness Groups
You can also create different Completeness Groups for mandatory fields and for other fields.
You can also give them different weights if you like.
You can weight “Web – Extended” with 0 and it will still work.
Since we can check different Completeness Groups in Query Editor you can search like this.
You can only search for one Completeness Group, but you can also Search for the Completess Value (score).
Setup 0 weighted rules
You can combined "mandatory" and "non-mandatory" fields in the same Completeness Group, by weighting the individual rules.
In the image above "Has description" is incomplete, but the Group is still considered as Complete. This is due to that the Rule "Has description" is weighted to 0.
Completeness on FieldSets fields
If you don't have to many FieldSets you can use completeness for fields in FieldSets.
In my example below I have a FieldSet called "Knife" and for all knifes a would like to have some fields set.
I have weighted all "FieldSet" Completeness Groups to 0, but their rules are weighted as normal.
With this approach you can search for incomplete Knifes with a Query like this.
Disclaimer! If you have to many FieldSets this approach might not be the best from a performance perspective.
Feel free to share other scenarios or other ways to play around with completeness.
-
Hi Tobias Månsson, thanks for sharing! Keep up the great work! 🤩
0 -
Hi Thanks,
but we have a lot of mandatory fields per fieldset. And lot's of fieldset. As you can see below.V : Visible but not mandatory in the fieldset
C: Compulsory in the fieldset
Empty : not applied to a fieldset0 -
I've tried this solution but I can't get it to work correctly. Example: EC011706
Here's my setup for my completeness rules:
And here's the group in question:
And here's a view on an item with the fieldset EC011706.
As you can see, inriver still views the group as incomplete, despite having 100% completion on the rules.
Tobias Månsson Is this because the group "EC011706" has 0 weight?
0 -
Yes, due to that 0/100 is still 0.
0 -
Perhaps I didn't understand your comment correctly:
You can weight “Web – Extended” with 0 and it will still work.
This led me to believe that a group with 0 weight would be "completed" if it's rules were weighed correctly, which would in turn make it possible to use on fieldsets. However, if a fieldset weighed to 0 (despite it's rules are weighed) can never be completed, this solution doesn't help in querying if a specific fieldset is completed or not?
0 -
I guess you need to weight them with at least 1 for each group. If you have 2 "ETIM groups", both having 1 in weight, an Item without ETIM would be "complete" at 98% and an Item with ETIM would be considered complete at 99%.
Reading my text again I didn't test the positive outcome as you did. They will always end up Incomplete. With ETIM you could end up with 100 Groups and that will have huge impact on the performance when saving.
We are still waiting for async calculation for completeness when saving. Right now the completeness calculation is done after save to the database but before the UI is notified.
0 -
Thank you for the quick reply, Tobias!
0 -
If you are using FieldTypes on your Item you could create a custom Completeness Criteria to make sure that all "ETIM Mandatory" fields are set by using FieldType Settings. If the FieldType should be enriched for a certain class you can in the name append *.
Then you would have only one rule called "ETIM Complete" that checks if all fields within the selected FieldSet with the setting "ETIM_Completeness" have some data. This would have less impact on the performance as well. :-)
This does require coding however and not only configuration.0
Please sign in to leave a comment.
Comments
8 comments