Skip to main content
rishukumarg1965
March 22, 2024
Solved

Bold the text on confirmation message

  • March 22, 2024
  • 10 replies
  • 0 views

I want to bold text on confirmation message when i click the button.

    Best answer by amiteshs3330

    Create a rule with text as rule input -

    a!localVariables(
      local!lRange: 120302 - 97,
      local!uRange: 120276 - 65,
      joinarray(
        char(
          a!forEach(
            items: code(ri!text),
            expression: a!match(
              value: fv!item,
              whenTrue: and(fv!value > 96, fv!value < 123, ),
              then: fv!value + local!lRange,
              whenTrue: and(fv!value > 64, fv!value < 91, ),
              then: fv!value + local!uRange,
              default: fv!value
            )
          )
        ),
        ""
      )
    )

    Now call this from your interface -

    {
      a!buttonArrayLayout(
        buttons: {
          a!buttonWidget(
            label: "Button",
            style: "OUTLINE",
            confirmMessage: rule!MGS_bolding(text: "hello")
          )
        },
        align: "START",
        marginBelow: "NONE"
      )
    }

    10 replies

    rishukumarg1965
    March 22, 2024

    venkatrea696188
    March 22, 2024

    As far as i know this is also bold...

    rishukumarg1965
    March 22, 2024

    [mention:5abb751204a145abaeb28c7bf620b9d5:e9ed411860ed4f2ba0265705b8793d05]  Submit and open new thing is written under confirmHeader but i want to bold data which is written under confirmMessage

    konduruc733182
    March 22, 2024

    [mention:c7ed152842da4892ba88b9d946100b8f:e9ed411860ed4f2ba0265705b8793d05]  Simple answer is No. You cannot make changes to the format of that text written in confirmation message.

    March 22, 2024

    Create a rule with text as rule input -

    a!localVariables(
      local!lRange: 120302 - 97,
      local!uRange: 120276 - 65,
      joinarray(
        char(
          a!forEach(
            items: code(ri!text),
            expression: a!match(
              value: fv!item,
              whenTrue: and(fv!value > 96, fv!value < 123, ),
              then: fv!value + local!lRange,
              whenTrue: and(fv!value > 64, fv!value < 91, ),
              then: fv!value + local!uRange,
              default: fv!value
            )
          )
        ),
        ""
      )
    )

    Now call this from your interface -

    {
      a!buttonArrayLayout(
        buttons: {
          a!buttonWidget(
            label: "Button",
            style: "OUTLINE",
            confirmMessage: rule!MGS_bolding(text: "hello")
          )
        },
        align: "START",
        marginBelow: "NONE"
      )
    }

    rishukumarg1965
    March 23, 2024

    [mention:1f165d0242ce4a039a8d16bc75ec929b:e9ed411860ed4f2ba0265705b8793d05] thankyou it's working fine. Can we apply colors on the text on this code ??

    stefanhelzle0001
    Brainy
    March 23, 2024

    I covered this use case in a blog post.

    https://appian.rocks/2023/04/17/formatting-labels-in-appian/