local!selectedSystemType: if( a!isNotNullOrEmpty( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'] ), local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'], null() ),
a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_NEXT, icon: cons!SHARED_BUTTON_ICON_NEXT, saveInto: if( a!isNullOrEmpty(local!selectedSystemType), {}, a!save(local!currentDataFeedStep, local!currentDataFeedStep + 1) ), style: "SOLID", color: cons!SHARED_BUTTON_COLOR_NEXT, disabled: a!isNullOrEmpty( local!selectedSystemType ), showWhen: local!currentDataFeedStep < 3, validate: true() ),
Discussion posts and replies are publicly visible
Could you give us more details please?
yes given the whole code below
a!localVariables( local!currentDataFeedStep: 1, local!dataFeed: rule!EILM_getDataFeedDetails( inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion ), local!dataFeedFile: rule!EILM_getDataFeedFileDetails( inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion ), local!generatorFileExtensions: rule!RD_queryGeneratorExtensions(), local!dataFeedFiles: if( a!isNullOrEmpty(local!dataFeedFile), {}, local!dataFeedFile ), local!refSystemsData: rule!EILM_getRefSystemsData( systemType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] ), local!selectedSystemType: if( a!isNotNullOrEmpty( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'] ), local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'], null() ), local!inventoryIntegData: local!refSystemsData, local!columnsInARow: 3, local!numberOfRows: ceiling( count(local!inventoryIntegData) / local!columnsInARow ), a!formLayout( label: "", contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!sectionLayout(contents: {}, marginAbove: "MORE") }, width: "NARROW" ), a!columnLayout( contents: { if( local!currentDataFeedStep = 1, { a!cardChoiceField( label: "Data Feed Type", labelPosition: "ABOVE", data: { a!map( id: 1, icon: "sign-in", primaryText: "Source" ), a!map( id: 2, icon: "sign-out", primaryText: "Target" ) }, sort: { a!sortInfo(field: "id", ascending: true) }, cardTemplate: a!cardTemplateBarTextStacked( id: fv!data.primaryText, primaryText: fv!data.primaryText, icon: fv!data.icon ), value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], maxSelections: 1, required: true() ), a!columnsLayout( columns: { a!columnLayout( contents: { a!forEach( items: enumerate(local!numberOfRows), expression: a!columnsLayout( columns: { a!forEach( items: index( local!inventoryIntegData, enumerate(local!columnsInARow) + 1 + (fv!item * local!columnsInARow), null ), expression: a!columnLayout( contents: a!localVariables( local!isSelected: if( a!isNotNullOrEmpty(local!selectedSystemType), true, false() ), a!cardLayout( contents: { a!imageField( images: a!documentImage( document: rule!EILM_Datafeed_fetchSystemIcon( systemCode: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] ) ), align: "CENTER" ), a!richTextDisplayField( value: { a!richTextItem( text: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{abcb5cb3-86d6-4255-9ce3-f435dc50cb36}systemName'] ) }, align: "CENTER" ) }, link: a!dynamicLink( saveInto: { a!save( local!isSelected, if(local!isSelected, false(), true()) ), a!save( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'], fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode']/*if(*/ /*local!isSelected,*/ /*append(*/ /*local!selectedSystemType,*/ /*fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode']*/ /*),*/ /*remove(*/ /*local!selectedSystemType,*/ /*wherecontains(*/ /*fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'],*/ /*local!selectedSystemType*/ /*)*/ /*)*/ /*)*/ ) }, showWhen: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{2d6991e2-9f13-4ad3-9606-9b5146d964cd}isActive'] = true() ), tooltip: if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{2d6991e2-9f13-4ad3-9606-9b5146d964cd}isActive'], "", "Unavailable" ), showWhen: a!isNotNullOrEmpty(fv!item), shape: "SEMI_ROUNDED", decorativeBarPosition: if( local!isSelected, if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] = local!selectedSystemType, "BOTTOM", "NONE" ), "NONE" ), decorativeBarColor: if( local!isSelected, if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] = local!selectedSystemType, "POSITIVE", "" ), "" ) ) ), width: "MEDIUM" ) ) } ) ) }, showWhen: a!isNotNullOrEmpty(local!inventoryIntegData) ) }, showWhen: a!isNotNullOrEmpty( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] ) ) }, {} ), if( local!currentDataFeedStep = 2, { a!columnsLayout( columns: { a!columnLayout( contents: { a!imageField( images: a!documentImage( document: rule!EILM_Datafeed_fetchSystemIcon( systemCode: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'] ) ), size: "TINY", align: "CENTER" ) }, width: "EXTRA_NARROW" ), a!columnLayout( contents: { a!richTextDisplayField( value: { a!richTextItem( text: { displayvalue( local!selectedSystemType, local!refSystemsData['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'], local!refSystemsData['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{abcb5cb3-86d6-4255-9ce3-f435dc50cb36}systemName'], local!selectedSystemType ) }, color: "STANDARD", size: "LARGE", style: { "STRONG" } ), char(10), a!richTextItem( text: { local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] }, color: "STANDARD", size: "STANDARD", style: "EMPHASIS" ) }, align: "LEFT", marginBelow: "MORE" ) } ) } ), a!textField( label: "Name", labelPosition: "ABOVE", value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], required: true ), a!paragraphField( label: "Description", labelPosition: "ABOVE", value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], required: true ) }, {} ), if( local!currentDataFeedStep = 3, a!sectionLayout( contents: { a!gridLayout( labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell(label: "Name"), a!gridLayoutHeaderCell(label: "Extension"), a!gridLayoutHeaderCell(label: "File Upload"), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( items: local!dataFeedFiles, expression: a!gridRowLayout( contents: { a!textField( label: "Name " & fv!index, labelPosition: "COLLAPSED", value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], required: true, disabled: ri!readOnly ), a!textField( label: "Extension " & fv!index, labelPosition: "COLLAPSED", value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], required: true, disabled: ri!readOnly ), a!fileUploadField( label: "Upload File", target: cons!EILM_FOLDER_UPLOADED_TEMPLATES, maxSelections: 1, value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], disabled: ri!readOnly, validations: { if( contains( { "xls", "xlsx", "xlsb", "xlsm" }, fv!files.extension ), "", "Please upload an Excel file" ), if( contains( local!generatorFileExtensions['recordType!{2bc40ec7-ea32-4e02-a277-73f9dbc96d16}RD Generator Type File Extension.fields.{20fb2414-80af-4e13-a244-bd6a83a8be6f}fileExtension'], fv!files.extension ), "", "Please upload an Excel file" ), if( not( fv!files.extension = fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'] ), "The uploaded file extension does not match the entered extension.", "" ) } ), a!richTextDisplayField( value: a!richTextIcon( icon: "close", altText: "Delete", link: a!dynamicLink( saveInto: a!save( local!dataFeedFiles, remove(local!dataFeedFiles, fv!index) ) ), linkStyle: "STANDALONE", color: "NEGATIVE" ) ) } ) ), addRowLink: a!dynamicLink( label: "Add File", saveInto: a!save( local!dataFeedFiles, append( local!dataFeedFiles, cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { documentName: null, documentExtension: null, documentIdentifier: null } ) ) ) ), shadeAlternateRows: true ) } ), {} ) } ), a!columnLayout( contents: { a!sectionLayout(contents: {}, marginAbove: "MORE") }, width: "NARROW" ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_NEXT, icon: cons!SHARED_BUTTON_ICON_NEXT, saveInto: if( a!isNullOrEmpty(local!selectedSystemType), {}, a!save(local!currentDataFeedStep, local!currentDataFeedStep + 1) ), style: "SOLID", color: cons!SHARED_BUTTON_COLOR_NEXT, disabled: a!isNullOrEmpty( local!selectedSystemType ), showWhen: local!currentDataFeedStep < 3, validate: true() ), a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_SUBMIT, icon: cons!SHARED_BUTTON_ICON_SUBMIT, saveInto: { a!save( ri!dataFeedFiles, a!forEach( items: local!dataFeedFiles, expression: if( a!isNotNullOrEmpty( fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{ef63486f-8e0f-4a48-babb-ecd48054c53f}dataFeedFileId'] ), cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { dataFeedFileId: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{ef63486f-8e0f-4a48-babb-ecd48054c53f}dataFeedFileId'], dataFeedFileUuid: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{8aba7814-925b-4b66-a8c8-9cce943a8750}dataFeedFileUuid'], documentName: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], documentExtension: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], documentIdentifier: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, isActive: true, createdBy: loggedInUser(), createdOn: now() } ), cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { dataFeedUuid: rule!SHARED_generateUUID(), documentName: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], documentExtension: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], documentIdentifier: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, isActive: true, createdBy: loggedInUser(), createdOn: now() } ) ) ) ), a!save( ri!dataDetails, if( a!isNotNullOrEmpty(local!dataFeed), cast( 'recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed', { dataFeedId: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{2f196198-a494-43c6-aab9-b47bfa9c64fb}dataFeedId'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, dataFeedType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], name: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], description: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], systemTypeCode: local!selectedSystemType, isActive: true(), lastModifiedBy: loggedInUser(), lastModifiedOn: now(), dataFeedUuid: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{2391bdea-3829-4be4-8c35-7c6c5c1d7da9}dataFeedUuid'] } ), cast( 'recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed', { inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, dataFeedUuid: rule!SHARED_generateUUID(), dataFeedType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], name: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], description: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], systemTypeCode: local!selectedSystemType, isActive: true(), lastModifiedBy: loggedInUser(), lastModifiedOn: now(), } ) ) ) }, submit: true, style: "SOLID", color: cons!SHARED_BUTTON_COLOR_SUBMIT, disabled: a!isNullOrEmpty(local!dataFeedFiles), showWhen: local!currentDataFeedStep = 3, validate: true() ) }, secondaryButtons: { a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_CANCEL, icon: cons!SHARED_BUTTON_ICON_CANCEL, saveInto: ri!cancel, submit: true(), color: cons!SHARED_BUTTON_COLOR_CANCEL, validate: false() ), a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_BACK, icon: cons!SHARED_BUTTON_ICON_BACK, value: true, saveInto: { a!save( local!currentDataFeedStep, local!currentDataFeedStep - 1 ) }, submit: false, color: cons!SHARED_BUTTON_COLOR_BACK, disabled: a!isNullOrEmpty(local!selectedSystemType), showWhen: local!currentDataFeedStep > 1, validate: false() ) } ) ))
a!localVariables( local!currentDataFeedStep: 1, local!dataFeed: rule!EILM_getDataFeedDetails( inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion ), local!dataFeedFile: rule!EILM_getDataFeedFileDetails( inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion ), local!generatorFileExtensions: rule!RD_queryGeneratorExtensions(), local!dataFeedFiles: if( a!isNullOrEmpty(local!dataFeedFile), {}, local!dataFeedFile ), local!refSystemsData: rule!EILM_getRefSystemsData( systemType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] ), local!selectedSystemType: if( a!isNotNullOrEmpty( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'] ), local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'], null() ), local!inventoryIntegData: local!refSystemsData, local!columnsInARow: 3, local!numberOfRows: ceiling( count(local!inventoryIntegData) / local!columnsInARow ), a!formLayout( label: "", contents: { a!columnsLayout( columns: { a!columnLayout( contents: { a!sectionLayout(contents: {}, marginAbove: "MORE") }, width: "NARROW" ), a!columnLayout( contents: { if( local!currentDataFeedStep = 1, { a!cardChoiceField( label: "Data Feed Type", labelPosition: "ABOVE", data: { a!map( id: 1, icon: "sign-in", primaryText: "Source" ), a!map( id: 2, icon: "sign-out", primaryText: "Target" ) }, sort: { a!sortInfo(field: "id", ascending: true) }, cardTemplate: a!cardTemplateBarTextStacked( id: fv!data.primaryText, primaryText: fv!data.primaryText, icon: fv!data.icon ), value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], maxSelections: 1, required: true() ), a!columnsLayout( columns: { a!columnLayout( contents: { a!forEach( items: enumerate(local!numberOfRows), expression: a!columnsLayout( columns: { a!forEach( items: index( local!inventoryIntegData, enumerate(local!columnsInARow) + 1 + (fv!item * local!columnsInARow), null ), expression: a!columnLayout( contents: a!localVariables( local!isSelected: if( a!isNotNullOrEmpty(local!selectedSystemType), true, false() ), a!cardLayout( contents: { a!imageField( images: a!documentImage( document: rule!EILM_Datafeed_fetchSystemIcon( systemCode: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] ) ), align: "CENTER" ), a!richTextDisplayField( value: { a!richTextItem( text: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{abcb5cb3-86d6-4255-9ce3-f435dc50cb36}systemName'] ) }, align: "CENTER" ) }, link: a!dynamicLink( saveInto: { a!save( local!isSelected, if(local!isSelected, false(), true()) ), a!save( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'], fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode']/*if(*/ /*local!isSelected,*/ /*append(*/ /*local!selectedSystemType,*/ /*fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode']*/ /*),*/ /*remove(*/ /*local!selectedSystemType,*/ /*wherecontains(*/ /*fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'],*/ /*local!selectedSystemType*/ /*)*/ /*)*/ /*)*/ ) }, showWhen: fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{2d6991e2-9f13-4ad3-9606-9b5146d964cd}isActive'] = true() ), tooltip: if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{2d6991e2-9f13-4ad3-9606-9b5146d964cd}isActive'], "", "Unavailable" ), showWhen: a!isNotNullOrEmpty(fv!item), shape: "SEMI_ROUNDED", decorativeBarPosition: if( local!isSelected, if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] = local!selectedSystemType, "BOTTOM", "NONE" ), "NONE" ), decorativeBarColor: if( local!isSelected, if( fv!item['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'] = local!selectedSystemType, "POSITIVE", "" ), "" ) ) ), width: "MEDIUM" ) ) } ) ) }, showWhen: a!isNotNullOrEmpty(local!inventoryIntegData) ) }, showWhen: a!isNotNullOrEmpty( local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] ) ) }, {} ), if( local!currentDataFeedStep = 2, { a!columnsLayout( columns: { a!columnLayout( contents: { a!imageField( images: a!documentImage( document: rule!EILM_Datafeed_fetchSystemIcon( systemCode: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{785adc35-6266-4c30-abbe-eca44c05c93d}systemTypeCode'] ) ), size: "TINY", align: "CENTER" ) }, width: "EXTRA_NARROW" ), a!columnLayout( contents: { a!richTextDisplayField( value: { a!richTextItem( text: { displayvalue( local!selectedSystemType, local!refSystemsData['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{037fb842-a09e-4e3f-836e-85f83c476be1}systemCode'], local!refSystemsData['recordType!{6bfcaf5e-7f37-4e20-a544-b4915d162997}RD Data Feed Systems.fields.{abcb5cb3-86d6-4255-9ce3-f435dc50cb36}systemName'], local!selectedSystemType ) }, color: "STANDARD", size: "LARGE", style: { "STRONG" } ), char(10), a!richTextItem( text: { local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'] }, color: "STANDARD", size: "STANDARD", style: "EMPHASIS" ) }, align: "LEFT", marginBelow: "MORE" ) } ) } ), a!textField( label: "Name", labelPosition: "ABOVE", value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], required: true ), a!paragraphField( label: "Description", labelPosition: "ABOVE", value: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], saveInto: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], required: true ) }, {} ), if( local!currentDataFeedStep = 3, a!sectionLayout( contents: { a!gridLayout( labelPosition: "ABOVE", headerCells: { a!gridLayoutHeaderCell(label: "Name"), a!gridLayoutHeaderCell(label: "Extension"), a!gridLayoutHeaderCell(label: "File Upload"), a!gridLayoutHeaderCell(label: "") }, columnConfigs: { a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "DISTRIBUTE", weight: 3), a!gridLayoutColumnConfig(width: "ICON") }, rows: a!forEach( items: local!dataFeedFiles, expression: a!gridRowLayout( contents: { a!textField( label: "Name " & fv!index, labelPosition: "COLLAPSED", value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], required: true, disabled: ri!readOnly ), a!textField( label: "Extension " & fv!index, labelPosition: "COLLAPSED", value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], required: true, disabled: ri!readOnly ), a!fileUploadField( label: "Upload File", target: cons!EILM_FOLDER_UPLOADED_TEMPLATES, maxSelections: 1, value: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], saveInto: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], disabled: ri!readOnly, validations: { if( contains( { "xls", "xlsx", "xlsb", "xlsm" }, fv!files.extension ), "", "Please upload an Excel file" ), if( contains( local!generatorFileExtensions['recordType!{2bc40ec7-ea32-4e02-a277-73f9dbc96d16}RD Generator Type File Extension.fields.{20fb2414-80af-4e13-a244-bd6a83a8be6f}fileExtension'], fv!files.extension ), "", "Please upload an Excel file" ), if( not( fv!files.extension = fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'] ), "The uploaded file extension does not match the entered extension.", "" ) } ), a!richTextDisplayField( value: a!richTextIcon( icon: "close", altText: "Delete", link: a!dynamicLink( saveInto: a!save( local!dataFeedFiles, remove(local!dataFeedFiles, fv!index) ) ), linkStyle: "STANDALONE", color: "NEGATIVE" ) ) } ) ), addRowLink: a!dynamicLink( label: "Add File", saveInto: a!save( local!dataFeedFiles, append( local!dataFeedFiles, cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { documentName: null, documentExtension: null, documentIdentifier: null } ) ) ) ), shadeAlternateRows: true ) } ), {} ) } ), a!columnLayout( contents: { a!sectionLayout(contents: {}, marginAbove: "MORE") }, width: "NARROW" ) } ) }, buttons: a!buttonLayout( primaryButtons: { a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_NEXT, icon: cons!SHARED_BUTTON_ICON_NEXT, saveInto: if( a!isNullOrEmpty(local!selectedSystemType), {}, a!save(local!currentDataFeedStep, local!currentDataFeedStep + 1) ), style: "SOLID", color: cons!SHARED_BUTTON_COLOR_NEXT, disabled: a!isNullOrEmpty( local!selectedSystemType ), showWhen: local!currentDataFeedStep < 3, validate: true() ), a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_SUBMIT, icon: cons!SHARED_BUTTON_ICON_SUBMIT, saveInto: { a!save( ri!dataFeedFiles, a!forEach( items: local!dataFeedFiles, expression: if( a!isNotNullOrEmpty( fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{ef63486f-8e0f-4a48-babb-ecd48054c53f}dataFeedFileId'] ), cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { dataFeedFileId: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{ef63486f-8e0f-4a48-babb-ecd48054c53f}dataFeedFileId'], dataFeedFileUuid: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{8aba7814-925b-4b66-a8c8-9cce943a8750}dataFeedFileUuid'], documentName: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], documentExtension: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], documentIdentifier: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, isActive: true, createdBy: loggedInUser(), createdOn: now() } ), cast( 'recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File', { dataFeedUuid: rule!SHARED_generateUUID(), documentName: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{2fc76596-56b8-4faa-89f7-aadb9539b9dd}documentName'], documentExtension: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{c7f43907-c03c-451c-97d4-45f97bec01e1}documentExtension'], documentIdentifier: fv!item['recordType!{d5acb584-1ef4-41cb-9dca-613a1fb308ae}EILM Data Feed File.fields.{a8f5f578-5835-4dd5-afd1-ddc6970e940f}documentIdentifier'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, isActive: true, createdBy: loggedInUser(), createdOn: now() } ) ) ) ), a!save( ri!dataDetails, if( a!isNotNullOrEmpty(local!dataFeed), cast( 'recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed', { dataFeedId: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{2f196198-a494-43c6-aab9-b47bfa9c64fb}dataFeedId'], inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, dataFeedType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], name: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], description: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], systemTypeCode: local!selectedSystemType, isActive: true(), lastModifiedBy: loggedInUser(), lastModifiedOn: now(), dataFeedUuid: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{2391bdea-3829-4be4-8c35-7c6c5c1d7da9}dataFeedUuid'] } ), cast( 'recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed', { inventoryUuid: ri!inventoryUuid, inventoryVersion: ri!inventoryVersion, dataFeedUuid: rule!SHARED_generateUUID(), dataFeedType: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{924b1363-dd64-4e91-8d6b-04b1416af2e9}dataFeedType'], name: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{a15c01e3-60be-4d15-ba17-6e1096bac853}name'], description: local!dataFeed['recordType!{fcce7d6a-d964-4fb7-bc9c-610a5333f0ee}EILM Inventory Data Feed.fields.{ce534f69-9f66-4876-a2bc-2926c4875a80}description'], systemTypeCode: local!selectedSystemType, isActive: true(), lastModifiedBy: loggedInUser(), lastModifiedOn: now(), } ) ) ) }, submit: true, style: "SOLID", color: cons!SHARED_BUTTON_COLOR_SUBMIT, disabled: a!isNullOrEmpty(local!dataFeedFiles), showWhen: local!currentDataFeedStep = 3, validate: true() ) }, secondaryButtons: { a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_CANCEL, icon: cons!SHARED_BUTTON_ICON_CANCEL, saveInto: ri!cancel, submit: true(), color: cons!SHARED_BUTTON_COLOR_CANCEL, validate: false() ), a!buttonWidget( label: cons!SHARED_BUTTON_LABEL_BACK, icon: cons!SHARED_BUTTON_ICON_BACK, value: true, saveInto: { a!save( local!currentDataFeedStep, local!currentDataFeedStep - 1 ) }, submit: false, color: cons!SHARED_BUTTON_COLOR_BACK, disabled: a!isNullOrEmpty(local!selectedSystemType), showWhen: local!currentDataFeedStep > 1, validate: false() ) } ) ) )
Did you investigate what that variable local!selectedSystemType is doing over time?
For debugging purposes, I often use a simple textfield to display certain values.
I tested it using a text field it is updating the details perfectly
OK, but your question is about the condition for that disabled button. You use a!isnullorempty(). Does this change as expected?
No
OK. Then you need to find the root cause for this unexpected behaviour.