1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Relationship fields access through scripting

Discussão em 'PSDN - Forum' iniciado por rzanardo, Junho 23, 2017.

  1. rzanardo

    rzanardo Guest

    Hi everyone.

    I'm "recreating" an old budget system that was developed with Ruby On Rails, with Rollbase, and I'm trying to create a HTML table to display some data. I couldn't find a way to use Rollbase's default list views or anything else, because these data has a very specific pattern.

    I have some objects related something like this, to exemplify:

    They're all "one-to-one" relationships, let's say -> Invoice -> Contract -> Bank Details

    I create an invoice, that has a contract, that's linked to a "bank details" object.

    The relationship works well, no problem with that, but I'm trying to make a document template to print this invoice in the correct way that our company uses.

    But I've noticed, that Rollbase's helpers, in the new document's template screen (invoice object), for instance, the "Related Contract", with which I can access all of its fields and values... the related contract, in turn, shows the "field" or "linkup" to the bank details, I don't get it right, because I just can't access the "Bank Details" object's values in any way.

    To exemplify a little what I'm doing :


    To access the "END DATE" field from the Contract related to the invoice object : {!R353905312.end_date}

    To access the "BANK DETAIL" from the Contract related to the invoice object : {!R353905312.R353905254#id}
    The problem is, if I remove the #id, or replace it with ANYTHING else, it just won't bring me any value.

    I'm having trouble to understand this rollbase format, since I'm used to "default database development", which I can relate and access anything by putting "dots" (.) and the fields names, I think I just can't access the fields of a "3rd level" related field, from the "1st", like in the example above.

    The solution I could find was to create Related Fields of the Bank Details Object, in the Contract Object, to keep a "path" to access these values, but it just didn't seemed like it was the right way.

    Is there any other solution, or did I do it right?

    Thanks in advance, everyone.

    Continue reading...

Compartilhe esta Página