Hello everyone,
{ a!columnsLayout( columns: a!columnLayout( contents: if( ri!showAllLinks_bool, {}, rule!CR_APP_RT_displayApproverInfoNote( message_txt: "New workflow cannot be initiated as another child flow is open/in-progress" ) ) ) ), /*Release & delete to be shown where action proposed = Release or Delete*/ /*No other Child process to be shown when release/delete proposed*/ /*process button shown to DU users only*/ if( contains( cons!CR_APP_CHOICES_ACTION_PROPOSED, tostring( index( ri!crAppSelected_cdt, "proposedAction_txt", null ) ) ), a!columnsLayout( alignVertical: "TOP", columns: { if( and( contains( { cons!CR_TXT_CCAD_UNIT, cons!CR_TXT_SYND_GROUP }, rule!CR_FN_getUserRole(loggedInUser()) ), tostring( index(ri!crAppSelected_cdt, "status_txt", null) ) <> "Released" ), a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 8 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ), a!columnLayout( contents: rule!CR_APP_RT_displayApproverInfoNote( message_txt: "No child Process can be initiated" ) ) ) } ), { /*Deferral Waiver, Legal, Release*/ /*Shown for dashboard and all the source types*/ /*Shown for other documents sourceType item*/ a!columnsLayout( showWhen: contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, 3 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ), /*Deferral Waiver and Legal*/ /*Show buttons when Best Effort and Conditions is filled*/ /*Shown for dashboard and all the source types*/ a!columnsLayout( showWhen: not( contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ) ), alignVertical: "TOP", columns: if( and( ri!sourceType_txt <> cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10], or( rule!APN_isEmpty(ri!crAppSelected_cdt), rule!APN_isBlank( index( ri!crAppSelected_cdt, "conditionFlag_txt", {} ) ), rule!APN_isBlank( index( ri!crAppSelected_cdt, "requirementFlag_txt", {} ) ) ) ), a!columnLayout( width: "AUTO", contents: { rule!CR_APP_RT_displayApproverInfoNote( size_txt: "STANDARD", message_txt: "Best Effort & Conditions values are required to initiate Deferral, Waiver or CSG Review." ) } ), a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, 3 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) ) ), /*DU child processes*/ /*show only for DU user*/ /*BU review shown to all source type, others shown only in collateral source type*/ a!columnsLayout( showWhen: and( ri!isFromDashboard_bool <> true(), contains( { cons!CR_TXT_CCAD_UNIT, cons!CR_TXT_SYND_GROUP }, rule!CR_FN_getUserRole(loggedInUser()) ), not( contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ) ) ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 4, 5, 6, 7 }, null ) }, expression: a!columnLayout( width: "AUTO", contents: { a!cardLayout( showBorder: false(), showWhen: if( fv!index = 1, true(), contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10] }, ri!sourceType_txt ) ), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ) } ) }
with this code I need to remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] rest 1,2 would be there as it is in second columnsLayout .
2nd thing: in 3rd ColumnsLayout for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] cons value need to display cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, } only rest of the things should be there.
3rd Thing: in 4th column layout need to display only cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 7 }, for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] and cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10] how would I do that? Can someone plz help with the same code ?
Thanks in Advance
case 2:
Discussion posts and replies are publicly visible
This is pretty hard to follow. What are you expecting to happen, in plain language? What is happening instead? Can you provide some screenshots of what you're seeing, and describe what you were hoping to see instead (or maybe post some mockups that we can compare/contrast)?
In cases like this I always suggest to start off simple, get one thing working well, then add on one thing at a time, and only move on once you get the previous item working. It seems instead like you're trying to do everything at once, and accidentally ending up with a huge pile of overengineered / mis-engineered form code that you either don't understand or just won't work (i can't really tell which, if either, is the main issue here).
ok,let me explain you again.
{ a!columnsLayout( columns: a!columnLayout( contents: if( ri!showAllLinks_bool, {}, rule!CR_APP_RT_displayApproverInfoNote( message_txt: "New workflow cannot be initiated as another child flow is open/in-progress" ) ) ) ), /*Release & delete to be shown where action proposed = Release or Delete*/ /*No other Child process to be shown when release/delete proposed*/ /*process button shown to DU users only*/ if( contains( cons!CR_APP_CHOICES_ACTION_PROPOSED, tostring( index( ri!crAppSelected_cdt, "proposedAction_txt", null ) ) ), a!columnsLayout( alignVertical: "TOP", columns: { if( and( contains( { cons!CR_TXT_CCAD_UNIT, cons!CR_TXT_SYND_GROUP }, rule!CR_FN_getUserRole(loggedInUser()) ), tostring( index(ri!crAppSelected_cdt, "status_txt", null) ) <> "Released" ), a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 8 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ), a!columnLayout( contents: rule!CR_APP_RT_displayApproverInfoNote( message_txt: "No child Process can be initiated" ) ) ) } ), { /*Deferral Waiver, Legal, Release*/ /*Shown for dashboard and all the source types*/ /*Shown for other documents sourceType item*/ a!columnsLayout( showWhen: contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, 3 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ), a!columnsLayout( showWhen: contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] }, ri!sourceType_txt ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ), /*Deferral Waiver and Legal*/ /*Show buttons when Best Effort and Conditions is filled*/ /*Shown for dashboard and all the source types*/ a!columnsLayout( showWhen: not( contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ) ), alignVertical: "TOP", columns: if( and( ri!sourceType_txt <> cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10], or( rule!APN_isEmpty(ri!crAppSelected_cdt), rule!APN_isBlank( index( ri!crAppSelected_cdt, "conditionFlag_txt", {} ) ), rule!APN_isBlank( index( ri!crAppSelected_cdt, "requirementFlag_txt", {} ) ) ) ), a!columnLayout( width: "AUTO", contents: { rule!CR_APP_RT_displayApproverInfoNote( size_txt: "STANDARD", message_txt: "Best Effort & Conditions values are required to initiate Deferral, Waiver or CSG Review." ) } ), a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, 3 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) ) ), a!columnsLayout( showWhen: contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] }, ri!sourceType_txt ), alignVertical: "TOP", columns: if( and( ri!sourceType_txt <> cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10], or( rule!APN_isEmpty(ri!crAppSelected_cdt), rule!APN_isBlank( index( ri!crAppSelected_cdt, "conditionFlag_txt", {} ) ), rule!APN_isBlank( index( ri!crAppSelected_cdt, "requirementFlag_txt", {} ) ) ) ), a!columnLayout( width: "AUTO", contents: { rule!CR_APP_RT_displayApproverInfoNote( size_txt: "STANDARD", message_txt: "Best Effort & Conditions values are required to initiate Deferral, Waiver or CSG Review." ) } ), a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2 }, null ) }, expression: a!columnLayout( width: "NARROW", contents: { a!cardLayout( showBorder: false(), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) ) ), /*DU child processes*/ /*show only for DU user*/ /*BU review shown to all source type, others shown only in collateral source type*/ a!columnsLayout( showWhen: and( ri!isFromDashboard_bool <> true(), contains( { cons!CR_TXT_CCAD_UNIT, cons!CR_TXT_SYND_GROUP }, rule!CR_FN_getUserRole(loggedInUser()) ), not( contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ) ) ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 4, 5, 6, 7 }, null ) }, expression: a!columnLayout( width: "AUTO", contents: { a!cardLayout( showBorder: false(), showWhen: if( fv!index = 1, true(), contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10] }, ri!sourceType_txt ) ), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ), a!columnsLayout( showWhen: and( ri!isFromDashboard_bool <> true(), contains( { cons!CR_TXT_CCAD_UNIT, cons!CR_TXT_SYND_GROUP }, rule!CR_FN_getUserRole(loggedInUser()) ), not( contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[7] }, ri!sourceType_txt ) ) ), alignVertical: "TOP", columns: { a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 7 }, null ) }, expression: a!columnLayout( width: "AUTO", contents: { a!cardLayout( showBorder: false(), showWhen: if( fv!index = 1, true(), contains( { cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10] }, ri!sourceType_txt ) ), height: "AUTO", style: if( ri!buttonAction_txt = fv!item, "ACCENT", "STANDARD" ), contents: { a!richTextDisplayField( labelPosition: "COLLAPSED", align: "CENTER", value: { a!richTextItem( text: fv!item, style: "STRONG", linkStyle: "STANDALONE" ) } ) }, link: a!dynamicLink( showWhen: and( ri!showAllLinks_bool, ri!buttonAction_txt <> fv!item ), value: fv!item, saveInto: { ri!buttonAction_txt, a!save( ri!moduleRecommendationStatusChild_cdt, rule!CR_FN_setModuleStatusHistoryChild( requestId_int: ri!requestId_int, cif_int: ri!cif_int ) ) } ) ) } ) ) } ) } ) }
I need to remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] rest 1,2 would be there as it is in second columnsLayout . I am trying to to remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] rest 1,2 would be there , I tried this in 3rd column.
2nd thing: in 3rd ColumnsLayout for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] cons value need to display cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, } only rest of the things should be there. I tried this in 5th columnsLayout.
3rd Thing: in 4th column layout need to display only cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 7 }, for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] and cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10]- I tried to achieve in 7th columnsLayout.
But there is some allignment issue and 2nd case is not working as expected.
sid said:remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] for the cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] rest 1,2 would be there as it is in second columnsLayout
Maybe someone else will have more luck parsing this, but (especially without some more plain-language explanation, comparing/contrasting your current results to mockups of some sort) to me this is pretty incomprehensible. As is most of what follows.
Sincerely, I'm not trying to be unkind here, just trying to let you know that this is not easy to follow for anyone not already familiar with your form design / desired end results.
Here’s a simplified version of what you described:
In the second column layout, I want to remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] when cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] is selected. The rest (1 and 2) should remain as they are. I tried this in the third column layout.
cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3]
cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6]
1
2
In the third column layout, I need to display only cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES values {1, 2} for cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1]. The other values should remain as they are. I tried this in the fifth column layout.
cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES
{1, 2}
cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1]
In the fourth column layout, I need to display only cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES value {7} for cons!CR_APP_TXT_CHILD_SOURCE_TYPES[1] and cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10]. I tried to achieve this in the seventh column layout.
{7}
cons!CR_APP_TXT_CHILD_SOURCE_TYPES[10]
However, there's an alignment issue, and the second case isn't working as expected.
The following is all I have time to get to for the moment but I'm hoping it'll give you a head start:
sid said: want to remove cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES[3] when cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6] is selected.
Here it might serve you to somewhat simplify your looping logic in your a!forEach. Instead of a complex index statement as the "items" source, you could simply call the indices you want. Resolve these against the values contained in your constant in the "expression" section.
/* old logic... a!forEach( items: { index( cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, { 1, 2, 3 }, null ) }, expression: a!columnLayout( */ /* revised structure: */ a!forEach( items: {1, 2, 3}, expression: a!localVariables( local!currentEntry: index(cons!CR_APP_TXT_NTB_CHILD_ACTION_TYPES, fv!item), if( and( ri!sourceType_txt = cons!CR_APP_TXT_CHILD_SOURCE_TYPES[6], fv!item = 3 ), {}, a!columnLayout( /* column logic goes here */ ) ) ) )