Skip to main content
rahuls0029
May 27, 2022
Solved

How can I change my billboard image in interface?

  • May 27, 2022
  • 10 replies
  • 0 views

I have been trying to change my billboard image of interface, I have uploaded a image in my folder but dont know how to use that in my interface billboard.. can anyone please explain?

thank you

    Best answer by nitinn0007

    a!billboardLayout(
      backgroundMedia: a!documentImage(
        document: /*cons!ET_WHAT_IS_A_TIMESHEET*/
        /*use your constant which is contain your image*/
        cons!WR_SCREENSHOT_106
      ),
      backgroundColor: "#f0f0f0",
      overlay: a!barOverlay(
        contents: {
          a!richTextDisplayField(
            labelPosition: "COLLAPSED",
            value: {
              "TimeSheet Submission"
            }
          )
        }
      )
    )

    10 replies

    stefanhelzle0001
    Brainy
    May 27, 2022

    Create a constant referencing your image and use that constant in the interface in a call to a!documentImage().

    rahuls0029
    May 27, 2022

    can you tell me the expression I dont know the exact expression for it ?

    stefanhelzle0001
    Brainy
    May 27, 2022

    Have a look at this pattern for inspiration. In line 26, use a!documentImage(cons!YOUR_IMAGE) instead of a!webImage()

    docs.appian.com/.../cards-as-list-items-pattern.html

    nitinn0007
    May 27, 2022

     a!billboardLayout(
                backgroundMedia: a!documentImage(
                  document: cons!WR_NITIN
                ),
                backgroundColor: "#f0f0f0",
                overlay: a!barOverlay(
                  contents: {
                    a!richTextDisplayField(
                      labelPosition: "COLLAPSED",
                      value: {
                        "TEVA`SÂ%A0 Â%A0Hotel"
                      }
                    )
                  }
                )
              )

    Hello Rahul, you can see the code I have sent,

    In these first you have to create a document from new objects and then there is a checkbox click on it than it creates a constant automatically and then inherit that constant in your billboard layout.

    rahuls0029
    May 27, 2022

    Hello Nitin, It is showing error 

    Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!billboardLayout [line 8]: A billboard layout has an invalid value for "backgroundMedia". "backgroundMedia" must be null or a document image, web image, or web video. Received: BillboardLayout.

    What I have written in expression:

    a!billboardLayout(
    backgroundMedia: a!documentImage(
    document: cons!ET_WHAT_IS_A_TIMESHEET
    ),
    backgroundColor: "#f0f0f0",
    overlay: a!barOverlay(
    contents: {
    a!richTextDisplayField(
    labelPosition: "COLLAPSED",
    value: {
    "TimeSheet Submission"
    }
    )
    }
    )
    )

    (I have created the constant referenced it to my image)

    nitinn0007
    May 27, 2022

    Always use these for sending the whole code for the best practice/resized-image/__size/320x240/__key/communityserver-discussions-components-files/62/Screenshot-_2800_167_29005F00_LI.jpg