Skip to main content
February 16, 2026
Question

Drop-down values

  • February 16, 2026
  • 6 replies
  • 0 views

Hi,

Here I am having one dropdown if I select Exclusion there then category,type and add exclusion button will be visible. But when I click on add exclusion button in next category and type are getting duplicated I dont want that I want to select other exclusion and Type differently . How can I achieve it?

Code:

local!set: if(a!isNotNullOrEmpty(local!exclusionList),
index(local!exclusionList.set,1,{}),
{}),

saveInto: {
a!forEach(
items: local!exclusionList,
expression: a!save(
local!exclusionList,
append(
local!exclusionList,
a!map(
set: local!set,
coveragetoRoleId: ri!basCoverageToRole['recordType!{33c2cbea-4c4e-4288-9d10-d6107f847a76}UWG Coverage To Role.fields.{c8b1b4ee-b5f4-494d-bcf3-763d83073e71}id'],
standardUWSupportCodeRefId: null,
exclusionText: ""
)
)
)
)
},

    6 replies

    stefanhelzle0001
    February 16, 2026
    But when I click on add exclusion button in next category and type are getting duplicated I dont want that I want to select other exclusion and Type differently .

    [emoticon:5ce50ea3f9eb49809e861e8733750338] ... I don't understand ...

    Please explain it like to a 5 year old.

    February 16, 2026

    same date is getting populated when I click on addAnotherExclusion but it shouldnot populate the same data

    stefanhelzle0001
    February 16, 2026

     .... I really do not like being forced to guess what you are doing and to roll a dice for the purpose ... !

    A typical issue is that you use a foreach to display multiple items, but in the saveInto you store directly into the rule input. Use fv!item as the save target instead.

    inci.carocci
    February 16, 2026

    Could you please copy and paste all the code?

    harshas2775
    February 17, 2026

    As per my understanding you want  the fileds to be emply/blank when you click on the 'Add Another Exclusion' link. Probably the fields in the section is referring to the same array variable and index that is used in the first section. You need to check and correct the value and saveinto for this section. IF you can share code of the section that renders these 3 fields we can help debug better. 

    Please insert code in community posts using

     

    adityag9712
    February 17, 2026

    Please don't use loop. 

    saveInto: {
      a!save(
        local!exclusionList,
        append(
          local!exclusionList,
          a!map(
            set: {},
            coveragetoRoleId: ri!basCoverageToRole['recordType!{33c2cbea-4c4e-4288-9d10-d6107f847a76}UWG Coverage To Role.fields.{c8b1b4ee-b5f4-494d-bcf3-763d83073e71}id'],
            standardUWSupportCodeRefId: null,
            exclusionText: ""
          )
        )
      )
    }