Viewing of externally hosted images in Appian Interface

Hi folks,

I have a typical requirement described below:

I will have JSON input in Appian system from an external OCR system which will contains some extracted field level details and some URL's of extracted images hosted in a targeted file system outside Appian. Can we show the preview of images in Appian UI using those document URL's present in JSON.

  Discussion posts and replies are publicly visible

Parents
  • Assuming that the images hosted in the target system are accessible via a SafeURI (httphttpsftp), you can use a!webImage as shown in this tutorial - https://docs.appian.com/suite/help/20.2/cards-as-list-items-pattern.html.

    The local!houses variable in the tutorial is the equivalent of your JSON data.

  • 0
    Certified Associate Developer
    in reply to Omkar Ambardekar

    I'm trying the a!webImage but some how the images are not rendering in the UI, all other images from the web are loading in the a!webImage component. Even the URI I'm trying to render is also working when I load in the browser. Pls suggest what went wrong

    /*  INTERFACE CODE  *?
    
    {
      a!localVariables(
        local!allCountriesList : rule!Tst_FullCountryInfoAllCountries(),
        local!selectedCountry: null,
        {
          a!sectionLayout(
            label: "Countries Information",
            contents: {
              a!dropdownField(
                label: "Select the Country",
                labelPosition: "ABOVE",
                placeholder: "--- Select a Value ---",
                choiceLabels: local!allCountriesList.sName,
                choiceValues: local!allCountriesList.sISOCode,
                value: local!selectedCountry.sISOCode,
                saveInto: {
                  a!save(
                    local!selectedCountry,
                    index(
                      local!allCountriesList,
                      wherecontains(
                        save!value,
                        local!allCountriesList["sISOCode"]
                      )
                    )
                  
                  )
                },
                searchDisplay: "AUTO",
                validations: {}
              ),
              a!imageField(
                label: "Country Flag",
                labelPosition: "ABOVE",
                images: {
                  a!webImage(
                    source: local!selectedCountry.sCountryFlag,
                    altText: "image not found"
                  )
                },
                size: "MEDIUM",
                isThumbnail: false,
                style: "STANDARD",
                showWhen: if(a!isNotNullOrEmpty(local!selectedCountry), true(), false())
              )
            }
            
          )
        }
      )
    
    }
    
    /*  VALUE OF selectedCountry  */
    
    	
    [sISOCode=AI, sName=Anguilla, sCapitalCity=The Valley, sPhoneCode=264, sContinentCode=AM, sCurrencyISOCode=CAD, sCountryFlag=http://www.oorsprong.org/WebSamples.CountryInfo/Flags/Anguilla.jpg, Languages=]

Reply
  • 0
    Certified Associate Developer
    in reply to Omkar Ambardekar

    I'm trying the a!webImage but some how the images are not rendering in the UI, all other images from the web are loading in the a!webImage component. Even the URI I'm trying to render is also working when I load in the browser. Pls suggest what went wrong

    /*  INTERFACE CODE  *?
    
    {
      a!localVariables(
        local!allCountriesList : rule!Tst_FullCountryInfoAllCountries(),
        local!selectedCountry: null,
        {
          a!sectionLayout(
            label: "Countries Information",
            contents: {
              a!dropdownField(
                label: "Select the Country",
                labelPosition: "ABOVE",
                placeholder: "--- Select a Value ---",
                choiceLabels: local!allCountriesList.sName,
                choiceValues: local!allCountriesList.sISOCode,
                value: local!selectedCountry.sISOCode,
                saveInto: {
                  a!save(
                    local!selectedCountry,
                    index(
                      local!allCountriesList,
                      wherecontains(
                        save!value,
                        local!allCountriesList["sISOCode"]
                      )
                    )
                  
                  )
                },
                searchDisplay: "AUTO",
                validations: {}
              ),
              a!imageField(
                label: "Country Flag",
                labelPosition: "ABOVE",
                images: {
                  a!webImage(
                    source: local!selectedCountry.sCountryFlag,
                    altText: "image not found"
                  )
                },
                size: "MEDIUM",
                isThumbnail: false,
                style: "STANDARD",
                showWhen: if(a!isNotNullOrEmpty(local!selectedCountry), true(), false())
              )
            }
            
          )
        }
      )
    
    }
    
    /*  VALUE OF selectedCountry  */
    
    	
    [sISOCode=AI, sName=Anguilla, sCapitalCity=The Valley, sPhoneCode=264, sContinentCode=AM, sCurrencyISOCode=CAD, sCountryFlag=http://www.oorsprong.org/WebSamples.CountryInfo/Flags/Anguilla.jpg, Languages=]

Children