Skip to main content
rahuls0029
Participating Frequently
May 27, 2022 6:34 AM UTC
Solved

How can I change my billboard image in interface?

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

    nitinn0007
    Inspiring
    May 27, 2022 7:33 AM UTC

    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 6:43 AM UTC

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

    rahuls0029
    Participating Frequently
    May 27, 2022 6:45 AM UTC

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

    stefanhelzle0001
    Brainy
    May 27, 2022 6:47 AM UTC

    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
    Inspiring
    May 27, 2022 6:57 AM UTC

     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
    Participating Frequently
    May 27, 2022 7:17 AM UTC

    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
    Inspiring
    May 27, 2022 7:22 AM UTC

    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