Skip to main content

Hi all,

I have an API that uses nested XML to deliver the data. I have used a relational model to be able to retrieve this data in separate tables. Based on key fields that are created I am able to join the tables back together. All works fine, however, I want to reference a (different) field from my parenttable in a nested table. 

Currently, the output adds a field _id in my parenttable PerformanceInfoRow to be able to reference the underlying data back to the specific period. However, this _id contains an integer. Daily I will get three rows of data and daily I will thus get back the _ids 1, 2 and 3. So, in the end this will not be a unique key when retrieving more days of data. Therefore, I want to specify the Period that also is available in the parenttable, which is unique since it will not only show the date but also whether it is morning, afternoon or evening. This will be unique, but unfortunately I am not able to add this field to the underlying tables. I have tried to adjust my RSD file but I cannot get it to work (yet). 

I have added my RSDs (the parenttable and nested table) in the attachment. In the screenshot below you will see the result in my nested table. The ID 1 should only be linked to the 2024/12/03 Ochtend, 2 should only be linked to 2024/12/03 Middag and 3 should only be linked to 2024/12/03 Nacht.

 

Any help would be much appreciated. :)

Best, 

Remy

Hi ​@Remy Kamphuis | Victa 

Did the PerformanceInfoRow_Shift_NL show it correctly?

I assume this 

/GetPerformanceInfo/PerformanceInfo/PerformanceInfoRow/OEECategories/OEECategoriesRow/PerformanceInfoRow_id" references="cPerformanceInfoRow].R_id]" />

Is supposed to refer to this value.

/GetPerformanceInfo/PerformanceInfo/PerformanceInfoRow/_id" />

It seems like it doesn’t get un set and therefore somehow gives back the same id twice for each type of period.

How is this data returned from the API in XML format?


Hi ​@Thomas Lind

The PerformanceInfoRow_Shift_NL shows the data correctly with the _id corresponding to the correct shift (Ochtend/Middag/Nacht). See below.

You are correct in your assumption that both field shoulds reference each other. They also do. This

/GetPerformanceInfo/PerformanceInfo/PerformanceInfoRow/OEECategories/OEECategoriesRow/PerformanceInfoRow_id" references="=PerformanceInfoRow].]_id]" />

indeed shows the similar value to this

/GetPerformanceInfo/PerformanceInfo/PerformanceInfoRow/_id" />

 

I want to add a second reference that uses the Period field since this field will always be unique.

Is there a possibility in the RSD file from the OEECategoriesRow to reference this Period field from the PerformanceInfoRow table in a correct way?


Hi ​@Remy Kamphuis | Victa 

I tried to change it a bit. Remember to convert it to a RSD file instead of XML to make it work.

 

Let me know if my suggestion makes a difference.


Hi ​@Thomas Lind 

I have synchronized the data source using your RSD file, but unfortunately the column PerformanceInfoRow_Period does not return any values. 

I can send you the full XML but I cannot attach a file in a personal message, and I can't publish it here due to the data. 


Hi ​@Remy Kamphuis | Victa 

Send it to support and explain what it is for. Then I will take a look at it.


Reply