Forum Discussion

FICO's avatar
FICO
Community Manager
6 years ago

Hi Everbody, Can we achieve Object.SubObject.Propery using code templates and providers. Example : theEmployee.Gender.Sex

(SRLEntities, SRLEntityTypeProvider,Class Properties, ClassPropertyTypeProvider,TypeOperatorProvider)

We were able to get the first level of attribute i.e., theEmployee.Gender but not theEmplyee.Gender.Sex.

Can someone help me on this.

2 Replies

  • FICO's avatar
    FICO
    Community Manager

    Inside the code template, you can follow the steps listed below to meet your goal:

    • Define a value holder with type as “Classes Provider” for classes(e.g. Vh1)
    • Define a value holder(e.g. Vh2) with type as “Class Properties Provider” for the properties, make sure to set arguments for Vh1 via dynamic override Class with Vh1
    • Define a value holder with type “Property Type Provider”(e.g. Vh3), make sure to set arguments for Vh3 via dynamic override Class with Vh1 and dynamic override Property with Vh2
    • Define a value holder with type as “Class Properties Provider”(e.g. Vh4),  make sure to set arguments for Vh3 via dynamic override Class with Vh3

    In this example, the Vh4 would be corresponding to the Object.SubOjbect.Property in your scenario.

  • FICO's avatar
    FICO
    Community Manager

    @Karen Yue​ thanks a lot for your solution. this solution solved my problem. But to achieve my requirement i made some changes accordingly.