26
Views
2
Comments
Showing atributes within atributes
Application Type
Traditional Web, Mobile, Reactive, Service
Service Studio Version
11.54.11 (Build 62474)

Hi All,

I am very new to OS and loving every minute of learning my way around however I am STUCK!

I am using a rest consume to pull in data from an IOT cloud service which is running great and I can display data etc.  However, here is the catch... as you will see in the image below, I have a list of attributes which I can drag and drop into a table, however, I also have the "events" attribute which has sub attributes. One of the "events" has a nameof r_status which tells me if the device is online or offline.  How can I build this into the same table as attributes that are on the same level as the "events" parent attribute?


i.e. I want a table that has:


ID:              Connection Type.               r_status

15.               WiFi.                                      OFFLINE


I can do the ID and Connection Type fine but cant figure how to tackle the r_status.  Any help would be very very gratefully received.

2019-03-19 12-24-07
Mariano Picco
 
MVP

You would probably need to fetch the data, then after fetching it, handle it (probably in an OnAfterFetch event) and search in that events list if there's one called r_status with a List Filter. Then, you can either set a local variable, or add an extra parameter to that Output structure and call it 'r_status' or whatever you'd like. 

1- Set an action to that Data action's on after fetch

2- Filter that events list to look for a 'Output.events.Current.name = "r_status".

3- Grab that "event"s name and store it somewhere

4- Use it in the table


UserImage.jpg
Joel Lister

Thanks @Mariano Picco that sounds perfect, so I have added a action to filter the list and set it to the following:


However, when I publish it, I get a mix of the r_status and the other events, it isnt filtering it. Any ideas please?

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