How to set the Assignment Group on Catalog Task based on Catalog Item?

VIKAS45
Tera Guru

How to set the Assignment Group(only 2) on Catalog Task based on Catalog Item?

Please let me know what script to be written to restrict to only 2  Assignment Group for Catalog Task based on Catalog Item.

4 REPLIES 4

Allen Andreas
Administrator
Administrator

Hello,

What are the conditions for when the filter should apply? Your post doesn't necessarily give enough information to fully help you, but from a high-level, you could use something like this in an advanced reference qualifier on the assignment group field (as a dictionary override for this table):

if (current.request_item.cat_item == 'catalog_item_sys_id_here') {
var query = "sys_idINsys_id_1,sys_id_2";
}
query;

So you'd use the catalog item sys_id that this applies to and the sys_id_1 and sys_id_2 of the two groups you only want to show.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi @VIKAS45 

Thank you for marking my reply as Helpful.

If it also helped guide you Correctly, please also mark it as "Accept Solution".

Thanks and take care! 🙂


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hi Allen,

 

Can we create Group Type and assign these 2 Groups to the same Group Type

and then we can write the script to restrict to only 2  Assignment Group for Catalog Task based on Catalog Item.

 

Please let me know where to write the script and script details.

Hello,

Yes, you can create a group type and assign the type to however many groups.

You can then go to your list view for groups and build your filter as you need, then right-click the last piece of the breadcrumb filter and choose "copy query" and then simply past that on the var query = line that I included above.

AllenAndreas_0-1678218300999.png

Example:

var query = "typeLIKE1cb8ab9bff500200158bffffffffff62";

 

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!