Expression backed record- rf variables are mapped properly

Generally when we use entity backed record, and when we click on particular record we can access that record data using "rf!".

But I am using expression backed record 

example I have a record with company employee cdt which has company id as one column.

Suppose for instance i have three companies and their ids are {15,16,17}. But these companies can have many employees.

So after you select a company it will redirect you to summary dashboard, and I can use rf!companyId to get all the employees 

If I use entity backed record am getting 16 if I click on a record whose company id is 16. but it is not happening in case of expression backed record.

 

Did someone faced similar challenges.

  Discussion posts and replies are publicly visible

Parents
  • +1
    Certified Lead Developer
    Hi As per my understanding, i would like to say 2 things,

    1) On Grid view of record, for the Link (the column value on which you want to have link to drill-down), following will be the configuration
    Label: rf!nameFieldWhichYouWantToDisplay
    Record Type: rp!type
    Identifier: rf!companyId (It's the column which you are treating as PK in CDT)

    2) Under Summary View: Call an interface which will have a rule Input of type Integer for companyId, and fetch list of employees by this rule Input on load using Web-API
    So under Record Summary you can call this rule as

    rule!yourSummaryView(rp!id)


    As i have tried the same and it's working great, hope this will work for you as well, if you configure the Record properly as mention in above steps.
  • Hello Alok,
    Thanks for the help, this helped.
    For the clarification, I have some question, can you help me with that
    - As you described above that we need to pass a identifier which should be primary key. Is that necessary if that isn't the case than can't we pass that also?
    - What is the significance of rp!id, as per my understanding rp is record property it should point out the values which we click on the particular record, is that right or their is much more?
    - Why are we passing rp!id in summary interface rule, shouldn't we had passed the primary key or anything that we want our summary dashboard interface should use?

    Thanks
    Shivam
  • 0
    Certified Lead Developer
    in reply to Shivam Gupta

    Hi shivamg ,

    The rp!id is different based on the source(Entity/Process/Service) of the data.

    • For entity-backed records, record ID is the primary key in the data store entity.
    • For process-backed records, record ID is the ID for the process.
    • For service-backed records, record ID is the value returned to the ID field of the DataSubset produced by the record's source expression.

    For more clarification Please refer : Record Link.

    Hope it will resolve your queries...!!

Reply
  • 0
    Certified Lead Developer
    in reply to Shivam Gupta

    Hi shivamg ,

    The rp!id is different based on the source(Entity/Process/Service) of the data.

    • For entity-backed records, record ID is the primary key in the data store entity.
    • For process-backed records, record ID is the ID for the process.
    • For service-backed records, record ID is the value returned to the ID field of the DataSubset produced by the record's source expression.

    For more clarification Please refer : Record Link.

    Hope it will resolve your queries...!!

Children
No Data