Skip to main content
Inspiring
Oct 25, 2022 11:05 PM UTC
Question

Interface potentially taking two json loads from API

Hello Community,

I have an interface that displays two types of data coming from two methods that delivers the json values.

If this is an individual I have built out a CDT that ties into the method "individualResult".  If it's a group, I will have to tie into the "groupResult" method.  

The properties are the same, but the methods are different.  I'm wondering if anyone has a recommendation as to how to build this out?

Let me know if more information is required.


Thank you.

    3 replies

    stefanhelzle0001
    Brainy
    Oct 26, 2022 6:50 AM UTC

    I am a fan of meaningful object names instead of generic ones with lots of parameters. I would create two integrations, wrapped into two expressions for data mapping and then, call one or the other in that interface.

    Inspiring
    Oct 26, 2022 1:34 PM UTC

    what would the logic be to call the correct expression?  Not sure what to check for to ensure the correct expression is called.

    stefanhelzle0001
    Brainy
    Oct 26, 2022 1:38 PM UTC

    You described that logic in your initial post. But you will have to find out how to decide which way to go.

    When you give us a bit more details, we might be able to support you.