Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Compare one field in two different multifields, if matched add the one field value.

Avatar

Level 2

Hi ,

There are two tabs in my dialog box with multifield in each tab. Assume, in first tabs multifield there's field with navigation title, link, and count also like how many multi fields that much count will generate i.e.. 1,2 & in 2nd tabs multifield there's fields like select id number & custom class.

I want to compare two multi fields and if count number and id number are same then in custom what we are writing that will get added to that li only.nav1.pngnav2.png

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Now it is totally understandable, But I think you can simplify the Author's Dialog and make it easier,
Just put the "Custom CSS Class" field into the first tab multifield.

  • No Need for additional validation
  • Less error prone
  • No extra complex code

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hello @ssin93 ,

Can you please explain more about this requirement?


I want to compare two multi fields and if count number and id number are same then in custom what we are writing that will get added to that li only.


I am not clear about your lines.

Avatar

Level 2

Hi @Sady_Rifat  We have requirement like link number as you can see in the HTML attribute tab like link number if we provide 1 and custom class name we provide something so if we have provided link number as 1 then that class name should get added to the primary navigation link in the first field while doing inspect that class name should show similarly if we provide 2 it should get added to the second primary navigation link.
To compare with that in the primary navigation field we are generating count as 1,2,3 etc so if the count number matches with the link number what we have added in the HTML attributes tab it should generate that custom css class which which are providing in the second tab.

I hope it will clarify your doubt if you need to know anything else please let me know.

Avatar

Correct answer by
Community Advisor

Now it is totally understandable, But I think you can simplify the Author's Dialog and make it easier,
Just put the "Custom CSS Class" field into the first tab multifield.

  • No Need for additional validation
  • Less error prone
  • No extra complex code