Display Data from Consume REST API

I am using a REST API to return a summary of request.

The request will have information as follow;

  • Reference No
  • Name of requester
  • Dept
  • Request Short Text
  • Request Detail
  • Status
  • Attachment

I am having problem to display the Request Details as it contain html syntax. I try to change the element to text area but that did not help as well. It does not auto translate the html syntax

Another information i need to resolve is the attachment. As you can see the attachment from the remote site is a link.

The closest i can find is the Link, In the Link events i get it to ReDirectToURL so that i can add the base url + the result of the attachment return from REST API eg "www.online.com"+Result.Data.Current.Attachment.

But when i click on the Click here to view attachment, it could not open in the apps. 

Can someone advise me , how do i handle the above 2 issues 

Thank you in advance


Solution

For the attachment , i adopted the FileViewerPlugin, as the attachment return from REST API is just a server path.

I created a button call View Attachment, when click it will run a client action. 

The assign will take the value from the REST and combine it will the base url and pass it to the openDocument FileViewerPlugin. Below is the setting for the opendocument.

I need to compile the apps and install the apk in order for it to work

Solution

I search the forum and found someone share this InjectHTML forge which help me resolve the HTML tag problem.

Reshare it here incase someone have the same issue as me :)

mvp_badge
MVP

Hi Jerah,

If I am not wrong you are doing this in mobile app (guessing it based on your UI, specially collapsed menu).

To display the HTML content you can can follow suggestion on this post

https://www.outsystems.com/forums/discussion/53230/how-to-display-html-on-mobile-app/

And regarding RedirectoToURL you have to always use the links starting with http or https. Then it will be redirected properly to the destination.

For the attachment , i install the plugin call File Viewer Plugin but i think the Plugin itself got problem cannot work properly. I had install the plugin but when doing the check it always say plugin not install. Anyone use this plugin File Viewer Plugin ?

I am also not following the HTML you suggested need to dig deeper :(

mvp_badge
MVP

Hi Jerah,

In order to be able to use plugins you will need to generate a native application and run it on your device directly. Plugins are not supported on the browser preview. If you have any issues using this plugin, I suggest you post your specific issue on the plugin's support forum.

Hope this helps!

Solution

I search the forum and found someone share this InjectHTML forge which help me resolve the HTML tag problem.

Reshare it here incase someone have the same issue as me :)

Solution

For the attachment , i adopted the FileViewerPlugin, as the attachment return from REST API is just a server path.

I created a button call View Attachment, when click it will run a client action. 

The assign will take the value from the REST and combine it will the base url and pass it to the openDocument FileViewerPlugin. Below is the setting for the opendocument.

I need to compile the apps and install the apk in order for it to work

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.