Card Layout

Certified Associate Developer

I have a card layout as below. Can anyone help If there a way for the button to not have that extra space before and after the rich text no matter what magnification or resizing of the screen is shown.

a!columnLayout(
                                          contents: {
                                            a!cardLayout(
                                              tooltip: "Only Assigned Status Tasks will be processed",
                                              contents: a!richTextDisplayField(
                                                align: "CENTER",
                                                value: {
                                                  
                                                  a!richTextItem(
                                                    text: "ACCEPT TASKS",
                                                    color: "ACCENT",
                                                    style: "STRONG",
                                                    
                                                  )
                                                  
                                                },
                                               
                                              ),
                                              link: a!dynamicLink(
                                                value: "ACCEPT",
                                                saveInto: local!acceptTask,
                                                showWhen: count(
                                                  tointeger(local!gridSelection.selected)
                                                ) <= 50
                                              ),
                                              style: "ACCENT"
                                            )
                                          },
                                          width: "NARROW"
                                        )

  Discussion posts and replies are publicly visible

Parents
  • Hi Pavitra, Try to use this code and achieve your requirement if you have to use a card layout or else you can try to use buttonArrayLayout().

    a!localVariables(
      local!gridSelection,
      local!acceptTask,
      a!columnLayout(
        contents: {
          a!columnsLayout(
            columns: {
              a!columnLayout(
                width: "1X",
                contents: {
                  a!cardLayout(
                    contents: a!richTextDisplayField(
                      value: {
                        a!richTextItem(
                          text: "ACCEPT TASKS",
                          color: "ACCENT",
                          style: "STRONG"
                        )
                      },
                      align: "CENTER"
                    ),
                    link: a!dynamicLink(
                      value: "ACCEPT",
                      saveInto: local!acceptTask,
                      showWhen: count(
                        tointeger(local!gridSelection.selected)
                      ) <= 50
                    ),
                    tooltip: "Only Assigned Status Tasks will be processed",
                    style: "ACCENT",
    
                  )
                }
              ),
              a!columnLayout(width: "7X", contents: {}),
              a!columnLayout(contents: {}, width: "5X", ),
              a!columnLayout(width: "1X", contents: {})
            }
          )
        },
        width: "EXTRA_NARROW"
      )
    )
    
    

Reply
  • Hi Pavitra, Try to use this code and achieve your requirement if you have to use a card layout or else you can try to use buttonArrayLayout().

    a!localVariables(
      local!gridSelection,
      local!acceptTask,
      a!columnLayout(
        contents: {
          a!columnsLayout(
            columns: {
              a!columnLayout(
                width: "1X",
                contents: {
                  a!cardLayout(
                    contents: a!richTextDisplayField(
                      value: {
                        a!richTextItem(
                          text: "ACCEPT TASKS",
                          color: "ACCENT",
                          style: "STRONG"
                        )
                      },
                      align: "CENTER"
                    ),
                    link: a!dynamicLink(
                      value: "ACCEPT",
                      saveInto: local!acceptTask,
                      showWhen: count(
                        tointeger(local!gridSelection.selected)
                      ) <= 50
                    ),
                    tooltip: "Only Assigned Status Tasks will be processed",
                    style: "ACCENT",
    
                  )
                }
              ),
              a!columnLayout(width: "7X", contents: {}),
              a!columnLayout(contents: {}, width: "5X", ),
              a!columnLayout(width: "1X", contents: {})
            }
          )
        },
        width: "EXTRA_NARROW"
      )
    )
    
    

Children
No Data