We have a dropdown value in the editable grid, and when we click on the add row button in the editable grid we have to get unique values for each row which means already selected value should be removed for next row in the grid dropdown. For your reference below is the first row I selected App Number and I clicked add row , now in the second row dropdown we should not get App number similarly for all rows.
a!gridLayout( label: "DropDown", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".fieldLabelEnglish" ) ), a!gridLayoutHeaderCell( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".fieldLabelFrench" ) ), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( local!systemRecords, { a!gridRowLayout( contents: { a!dropdownField( choiceLabels: { cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES }, choiceValues: { cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES }, label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".systemDynamicFields" ), labelPosition: "ABOVE", placeholder: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".genericDropdownPlaceholder" ), value: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], saveInto: { fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'], index( cons!UWG_CONS_TXT_FRENCH_SYSTEM_DYNAMIC_VALUES, wherecontains( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES ), null ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType'], cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM ), if( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ), { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], append( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) }, { if( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) ) } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) )/*French DropDown Population*/ } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType'], cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM ), if( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ), { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], append( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) }, { if( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) ) } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) } ) }, validations: {} ), a!dropdownField( choiceLabels: { cons!UWG_CONS_TXT_FRENCH_SYSTEM_DYNAMIC_VALUES }, choiceValues: { cons!UWG_CONS_TXT_FRENCH_SYSTEM_DYNAMIC_VALUES }, label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".systemDynamicFields" ), labelPosition: "ABOVE", placeholder: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".genericDropdownPlaceholder" ), value: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'], saveInto: { fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] }, disabled: true, validations: {} ), a!richTextDisplayField( value: { a!richTextIcon( icon: "times", link: a!dynamicLink( value: "", saveInto: { if( and( ri!isUpdate, not( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{87562531-2dee-4e70-95c0-2633a2b76590}id'] ) ) ), { if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: "" ) ) } ), if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: "" ) ) } ), a!save( fv!item, a!update( data: fv!item, index: { 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{a5ce96d2-22e4-48d8-8b98-0cbe346855cf}updatedBy', 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{cf9b41d7-6cd2-4580-aab6-b304312c9da6}updatedOn', 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{6056a1f4-5e5e-45cf-a227-29d55e9bd7ce}isActive' }, value: { loggedInUser(), now(), false } ) ), a!save( local!inactiveSystemRecords, append( local!inactiveSystemRecords, local!systemRecords[fv!index] ) ), a!save( local!systemRecords, remove(local!systemRecords, fv!index) ) }, { if( or( not(ri!isUpdate = true()), and( ri!isUpdate, rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{87562531-2dee-4e70-95c0-2633a2b76590}id'] ) ) ), { if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: "" ) ) } ), if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: "" ) ) } ), a!save( local!systemRecords, remove(local!systemRecords, fv!index) ) }, {} ) } ) } ), linkStyle: "STANDALONE", color: "NEGATIVE" ) } ) } ) } ), selectionSaveInto: {}, addRowLink: a!dynamicLink( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".addField" ), value: "", saveInto: { a!save( local!systemRecords, append( local!systemRecords, 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields'( 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType': cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM, 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{6056a1f4-5e5e-45cf-a227-29d55e9bd7ce}isActive': true ) ) ) } ), validations: {}, shadeAlternateRows: true )
Discussion posts and replies are publicly visible
Understood your requirement i added sample code for your reference you can make changes to your code accordingly
a!localVariables( /* Define available options */ local!allOptions: {"Option A", "Option B", "Option C", "Option D", "Option E"}, /* Initialize grid data */ local!gridData: { a!map(id: 1, selectedValue: null), a!map(id: 2, selectedValue: null) }, /* Get all currently selected values */ local!selectedValues: reject( fn!isnull, a!forEach( items: local!gridData, expression: fv!item.selectedValue ) ), a!formLayout( titleBar: "Unique Dropdown Example", contents: { a!sectionLayout( label: "Instructions", contents: { a!textField( label: "How it works:", value: "Each dropdown will only show options that haven't been selected in other rows. Try selecting values and adding new rows.", readOnly: true ) } ), a!gridLayout( label: "Grid with Unique Dropdowns", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell(label: "Row ID"), a!gridLayoutHeaderCell(label: "Select Unique Value"), a!gridLayoutHeaderCell(label: "Action") }, columnConfigs: { a!gridLayoutColumnConfig(width: "NARROW"), a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( items: local!gridData, expression: a!localVariables( /* Get available options for this row (exclude values selected in other rows) */ local!availableOptions: difference( local!allOptions, /* Remove current row's value from selected values to allow editing */ touniformstring( remove(local!selectedValues, wherecontains(fv!item.selectedValue, touniformstring(local!selectedValues)))) ), a!gridRowLayout( contents: { /* Row ID */ a!textField( value: fv!index, readOnly: true ), /* Dropdown with filtered choices */ a!dropdownField( placeholder: "-- Select a value --", choiceLabels: local!availableOptions, choiceValues: local!availableOptions, value: fv!item.selectedValue, saveInto: { fv!item.selectedValue, /* Update the selected values list */ a!save( local!selectedValues, reject( fn!isnull, a!forEach( items: local!gridData, expression: fv!item.selectedValue ) ) ) }, validations: {} ), /* Delete button */ a!richTextDisplayField( value: { a!richTextIcon( icon: "times", link: a!dynamicLink( saveInto: { /* Remove row */ a!save( local!gridData, remove(local!gridData, fv!index) ), /* Update selected values */ a!save( local!selectedValues, reject( fn!isnull, a!forEach( items: remove(local!gridData, fv!index), expression: fv!item.selectedValue ) ) ) } ), linkStyle: "STANDALONE", color: "NEGATIVE" ) } ) } ) ) ), addRowLink: a!dynamicLink( label: "Add Row", saveInto: { a!save( local!gridData, append( local!gridData, a!map( id: count(local!gridData) + 1, selectedValue: null ) ) ) }, /* Disable when all options are used */ showWhen: count(local!selectedValues) < count(local!allOptions) ), rowHeader: 1 ), /* Display current state for debugging */ a!sectionLayout( label: "Debug Information", contents: { a!textField( label: "All Available Options", value: joinarray(local!allOptions, ", "), readOnly: true ), a!textField( label: "Currently Selected Values", value: if( length(local!selectedValues) = 0, "None", joinarray(local!selectedValues, ", ") ), readOnly: true ), a!textField( label: "Remaining Options", value: if( length(difference(local!allOptions,touniformstring(local!selectedValues))) = 0, "All options used", joinarray(difference(local!allOptions,touniformstring( local!selectedValues)), ", ") ), readOnly: true ) }, isCollapsible: true ) } ) )
a!localVariables( /* Initialize the grid data */ local!systemRecords: { a!map( id: 1, fieldLabelEnglish: "App Number", fieldLabelFrench: "Numéro d'App", formattedValueEnglish: "<<data||App Number||data>>", formattedValueFrench: "<<data||Numéro d'App||data>>", dynamicType: 6959, /* Replace with your constant */ isActive: true ) }, /* Add this if you have inactive records tracking */ local!inactiveSystemRecords: {}, /* Assuming these are your constants - replace with actual values */ local!englishOptions: {"App Number", "Company Owner", "Policy Number", "Claim ID", "Customer Name"}, local!frenchOptions: {"Numéro d'App", "Propriétaire d'Entreprise", "Numéro de Police", "ID de Réclamation", "Nom du Client"}, a!gridLayout( label: "DropDown", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell(label: "Field Label - English"), a!gridLayoutHeaderCell(label: "Field Label - French"), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( local!systemRecords, { a!localVariables( /* Store current row index */ local!currentRowIndex: fv!index, /* Get all selected English values EXCEPT current row */ local!otherSelectedEnglishValues: reject( fn!isnull, a!forEach( items: local!systemRecords, expression: if( fv!index = local!currentRowIndex, null, fv!item.fieldLabelEnglish ) ) ), /* Get current row's English value */ local!currentEnglishValue: fv!item.fieldLabelEnglish, /* Calculate available choices - include current value if it exists */ local!availableEnglishChoices: if( isnull(local!currentEnglishValue), /* If no current value, show all unselected options */ difference( local!englishOptions, local!otherSelectedEnglishValues ), /* If has current value, show unselected options PLUS current value */ union( {local!currentEnglishValue}, difference( local!englishOptions, touniformstring( local!otherSelectedEnglishValues ) ) ) ), a!gridRowLayout( contents: { /* English Dropdown */ a!dropdownField( choiceLabels: local!availableEnglishChoices, choiceValues: local!availableEnglishChoices, placeholder: "-- Please select a value --", value: local!currentEnglishValue, saveInto: { fv!item.fieldLabelEnglish, /* Auto-populate French value */ a!save( fv!item.fieldLabelFrench, if( isnull(save!value), null, index( local!frenchOptions, wherecontains( save!value, local!englishOptions ), null ) ) ), /* Update formatted values */ a!save( fv!item.formattedValueEnglish, if( isnull(save!value), null, "<<data||" & save!value & "||data>>" ) ), a!save( fv!item.formattedValueFrench, if( isnull(save!value), null, "<<data||" & fv!item.fieldLabelFrench & "||data>>" ) ) } ), /* French Dropdown - Read Only */ a!dropdownField( choiceLabels: local!frenchOptions, choiceValues: local!frenchOptions, placeholder: "-- Please select a value --", value: fv!item.fieldLabelFrench, disabled: true ), /* Delete Icon */ a!richTextDisplayField( value: { a!richTextIcon( icon: "times", link: a!dynamicLink( saveInto: { a!save( local!systemRecords, remove(local!systemRecords, fv!index) ) } ), linkStyle: "STANDALONE", color: "NEGATIVE" ) } ) } ) ) } ), addRowLink: a!dynamicLink( label: "Add Field", saveInto: { a!save( local!systemRecords, append( local!systemRecords, a!map( id: count(local!systemRecords) + 1, fieldLabelEnglish: null, fieldLabelFrench: null, formattedValueEnglish: null, formattedValueFrench: null, dynamicType: 6959, isActive: true ) ) ) }, showWhen: count( reject( fn!isnull, a!forEach( items: local!systemRecords, expression: fv!item.fieldLabelEnglish ) ) ) < count(local!englishOptions) ), shadeAlternateRows: true ) )
a!localVariables( /* Get all currently selected English values */ local!allSelectedEnglishValues: a!forEach( items: local!systemRecords, expression: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ), a!gridLayout( label: "DropDown", labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".fieldLabelEnglish" ) ), a!gridLayoutHeaderCell( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".fieldLabelFrench" ) ), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "MEDIUM"), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( local!systemRecords, { a!localVariables( /* Store current row index */ local!currentRowIndex: fv!index, /* Get selected values excluding current row */ local!otherSelectedEnglishValues: a!forEach( items: local!systemRecords, expression: if( fv!index = local!currentRowIndex, null, fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ), /* Calculate available English choices */ local!availableEnglishChoices: difference( cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES, local!otherSelectedEnglishValues ), /* Calculate available French choices based on available English */ local!availableFrenchChoices: a!forEach( items: local!availableEnglishChoices, expression: index( cons!UWG_CONS_TXT_FRENCH_SYSTEM_DYNAMIC_VALUES, wherecontains( fv!item, cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES ), null ) ), a!gridRowLayout( contents: { a!dropdownField( choiceLabels: local!availableEnglishChoices, choiceValues: local!availableEnglishChoices, label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".systemDynamicFields" ), labelPosition: "ABOVE", placeholder: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".genericDropdownPlaceholder" ), value: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], saveInto: { fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'], index( cons!UWG_CONS_TXT_FRENCH_SYSTEM_DYNAMIC_VALUES, wherecontains( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'], cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES ), null ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType'], cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM ), if( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ), { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], append( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) }, { if( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) ) ) } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{d1a99936-fcc9-4f4e-b689-06a663a738f2}fieldLabelEnglish'] ) )/*French DropDown Population*/ } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType'], cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM ), if( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ), { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], append( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) }, { if( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) ) } ), a!save( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], rule!UWG_generateAmendmentFormattedTextForDynamicFields( fieldType: cons!UWG_CONS_TXT_FIELD_TYPE_SYSTEM, fieldName: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] ) ) } ) }, validations: {} ), a!dropdownField( choiceLabels: local!availableFrenchChoices, choiceValues: local!availableFrenchChoices, label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".systemDynamicFields" ), labelPosition: "ABOVE", placeholder: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".genericDropdownPlaceholder" ), value: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'], saveInto: { fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{0298a955-2862-4526-b616-d79f0eaa2a6b}fieldLabelFrench'] }, disabled: true, validations: {} ), a!richTextDisplayField( value: { a!richTextIcon( icon: "times", link: a!dynamicLink( value: "", saveInto: { if( and( ri!isUpdate, not( rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{87562531-2dee-4e70-95c0-2633a2b76590}id'] ) ) ), { if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: "" ) ) } ), if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: "" ) ) } ), a!save( fv!item, a!update( data: fv!item, index: { 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{a5ce96d2-22e4-48d8-8b98-0cbe346855cf}updatedBy', 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{cf9b41d7-6cd2-4580-aab6-b304312c9da6}updatedOn', 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{6056a1f4-5e5e-45cf-a227-29d55e9bd7ce}isActive' }, value: { loggedInUser(), now(), false } ) ), a!save( local!inactiveSystemRecords, append( local!inactiveSystemRecords, local!systemRecords[fv!index] ) ), a!save( local!systemRecords, remove(local!systemRecords, fv!index) ) }, { if( or( not(ri!isUpdate = true()), and( ri!isUpdate, rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{87562531-2dee-4e70-95c0-2633a2b76590}id'] ) ) ), { if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{657f4be1-54fc-4b71-8af5-94fc937f67a1}templateEnglish'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{b6e4949b-f007-4523-b589-97f25058f745}formattedValueEnglish'], replace_with: "" ) ) } ), if( or( rule!GBL_isBlankOrEmpty( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'] ), rule!GBL_isBlankOrEmpty( fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'] ) ), {}, { a!save( ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], /*substitute safe fix for 25.1*/ rule!CL_RULE_safeSubstitute( text: ri!record['recordType!{bf842322-0f8a-429a-873a-f0d69ec9d438}UWG Amendment Reference.relationships.{cbd28086-f4ea-4c46-a88b-e1a617136bb8}amendmentReferenceMaster.fields.{a94f4383-91a2-48fd-a9bf-cd64a4bf3a16}templateFrench'], find: fv!item['recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{31c52958-8917-4eed-8c68-e2c1e8e495b7}formattedValueFrench'], replace_with: "" ) ) } ), a!save( local!systemRecords, remove(local!systemRecords, fv!index) ) }, {} ) } ) } ), linkStyle: "STANDALONE", color: "NEGATIVE" ) } ) } ) ) } ), selectionSaveInto: {}, addRowLink: a!dynamicLink( label: rule!INZ_I18N_displayLabel( i18nData: local!i18nInterfaceData, bundleKey: cons!INZ_CONS_TXT_INTERFACE_COMPONENT_INTERNATIONALIZATION & ".addField" ), value: "", saveInto: { a!save( local!systemRecords, append( local!systemRecords, 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields'( 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{804028d2-0a75-4acc-8a7c-909854b876f6}dynamicType': cons!UWG_CONS_INT_REFERENCE_ID_DYNAMIC_TYPE_SYSTEM, 'recordType!{9d988a65-60b0-4735-b00d-5caf6ad59c60}UWG Amendment Master Dynamic Fields.fields.{6056a1f4-5e5e-45cf-a227-29d55e9bd7ce}isActive': true ) ) ) }, /* Disable Add Field when all options are used */ showWhen: count( reject( fn!isnull, local!allSelectedEnglishValues ) ) < count(cons!UWG_CONS_TXT_ENGLISH_SYSTEM_DYNAMIC_VALUES) ), validations: {}, shadeAlternateRows: true ) )