Image visible in interface but not in portal

Certified Senior Developer

Hello,

I have a portal which only has one interface. In the interface, I retrieve the data I need and store it in a local variable, I then use that local variable as the value for the document inside an imagefield component. In the interface, the data is successfully retrieved and is displayed in the imagefield component below. But in the portal, once I publish, the image is not visible. Does anyone know why that is? I already checked the service account permissions, I'll put them below as well.

Oh and also, "Register account" button doesn't work when I try to register a new account using the portal, even though in the process model, it does. I'm not sure if this also a service account permission problem or not

In interface, image is displayed successfully

In portal, there's not image

Code snippet

I retrieve the data from the record type and store it in a local variable

I display the image in the imagefield component

Service account permissions

Record types --> Viewer permission

Interface --> Viewer permission

Process model --> Initiator permissions

Document folder --> Viewer permissions

Any help is appreciated. Thank you!

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    You're trying to retrieve the document by ID, then show that document ID in a viewer in the Portal.

    This is something I'm not sure is compatible with Portals.  The way Portals currently work (as best as I understand it) is they are totally separate from most things in your appian installation with a bare few exceptions (like, recently, database queries), but all other objects and references, etc, are packaged up and installed on the "external" server that hosts the portal.

    Here you're trying to feed the interface an ID from a DB query, but then it's trying to just display that image by ID, even though the ID is an Appian FS document ID.  You need to consider at this point that the portal does not have direct visibility into the Appian FS at runtime, by design.

    I think the "supported" approach here would be to build a Web API that reaches the Appian filesystem and tries to request the document by ID, then display that locally.  I'm not sure it'll work but it might be worth a shot.

    Alternatively, if the number of "agreement" image files you have is pretty finite / small, you could potentially upload ALL of them to the portal, then use the retrieved document ID to decide (at runtime) which one you want to call.  Something like this where they end up in the portal's package would probably be the easiest approach, honestly.

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    You are a genius Mike! Thanks for that great description :-)

Reply Children
No Data