Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
prakashsaurav
Active Participant
946

Purpose


I was away from SAP BTP for some time lost in the world of Python and AI/ML and the SAP Low Code No Code Challenge shout-out was kind of home calling for me.

Why "Mental Health" as a topic?


Coz' as everyone is saying Mental Health Matters and it does for sure.

And I am using Public API from WHO, to showcase how easy it is to build such a user-friendly app using SAP AppGyver to provide data from such a public domain in a useful format for users.

Why Public API?


SAP Low Code No Code challenge allows the use of Public API.

And I wanted to really use it and experience the technical challenges that come with it. Because, if I build my own API then I tend to address all the challenges from the backend rather than the front-end.

About the App


The app consumes the API exposed by WHO for Global Health Observatory and displays the data for a specific country and for all indicators related to Mental Health.

The country is determined using the GPS location of the device on which the app is running.

It has four pages Welcome Page, Indicator Selection, Data Display, and Favourites.



Welcome Page


It detects the GPS Location and reads the coordinates longitude and latitude.

It uses the API from Opencage to do the Reverse Geoencoding and get the Country information.

Country info is saved as an App variable to be used in the following pages.

Allows navigation to the next page using a button click.



Select Indicator Page


This page on load reads the WHO API for Indicators using a filter for mental health-specific codes.

And bind the data to the Dropdown list using Mapping as Dropdown can only be bound to an object with 2 properties.

Dropdown selected value and selected label are bound to Indicator Code and Indicator Name variables.

Allows navigation to the next page using button click only when data is selected in the dropdown.




Data Display Page


This page on load reads the WHO API Indicator data specific to the selected country and displays the same as the list.

Also, verify if the indicator is already set as Favourite or not to control the display of components button (set as favourite) or icon (favourite indicator).

Verification "is a favourite" is built as Flow Function as the same check has to be done again to change the display when the Set as Favourite button is clicked.

It allows saving the Indicator as a Favourite to On Device data storage and also removing the indicator from Favourite.





Favourites Page


Displays the favourites indicator from device storage as a Basic list from the marketplace and allows navigation to the Data View page by clicking upon any item in the list.

Most Recently Tapped Item from Component Properties of Basic List is extracted which gives the ID of the record. Using the ID Get Record function is used to extract the related Indicator Code required to fetch relevant data on the next page.

This also uses a different Background Theme


 

App Demo




Link to App on AppGyver Portal.

Disclaimer: In Desktop Mode the Data is not from the source, as AppGyver needs ACOA (Access-Control-Allow-Origin) attribute in API response and which is not available in WHO API. Therefore, I put logic on the API Get Collection error to get data from a different source. I did this for a smooth experience for people viewing the app in desktop mode.

My Experience


I am loving it, I have used other low code platforms in the past like Outsystems, on which I have to learn for a considerable number of hours before delivering something on my own.

For this one, I did only one mission Create an Application with SAP AppGyver for an hour.

I liked the idea that in the development environment itself it was prompting my learning levels and what else I could use. I managed to complete all the initial ones.



Challenges / Suggestions



  1. AppGyver on OData integration does not allow filtering on API using CONTAINS, STARTSWITH, ENDSWITH. I am not sure of the reason or if there is a workaround but that feature will be needed.
    I ended up writing multiple EQUAL conditions.

  2. AppGyver on OData integration hides the Entityset info and it does not allow to dynamically change the Entityset or bind it to some variable.Again, not sure of the reason. But there are APIs, for example, WHO API, which exposes each Indicator as Entityset or endpoint and they all have a similar output so in this scenario we need dynamic binding. And I am sure definitely there will be other API which exposes dimensions as an endpoint.

  3. CASE / SWITCH type logic is not present, although there is a workaround using LOOKUP for basic type data, but the same does not work for complex type data.


 

All the best to All the Challengers ...


SOURCE (INTELIRA)
4 Comments
Labels in this area