Fail to getFieldValue from a linked form

Tap Forms – Organizer Database App for Mac, iPhone, and iPad Forums Script Talk Fail to getFieldValue from a linked form

Viewing 1 reply thread
  • Author
    Posts
  • November 10, 2022 at 11:18 AM #48222

    Gilles Cruypenynck
    Participant

    Hello,

    I’ll try to keep as clear and simple as I can…

    I have 2 forms ‘Factures’ (invoices) and ‘Entreprises’ (clients), classic one Client to many Invoices.
    – ‘Entreprises’ is linked to Factures with a one-to-many relation.
    – Each one of the ‘Entreprises’ has a ‘Code’.
    – In ‘Factures’ I want to concatenate “code_entreprise” with other fields from ‘Factures’.

    I wrote a script which works except for one line where I’m trying to get the ‘Code’ value from ‘Entreprises’ with:
    var code_entreprise = entreprises.getFieldValue(‘fld-e0835c6dcdd9468dbd5b4a65107b20d4’);
    but get a ‘ReferenceError: Can’t find variable: entreprises, line:(null)’

    See line 21 on the screenshot.

    Any clue of what I’m doing wrong?

    Gilles

    Attachments:
    You must be logged in to view attached files.
    November 10, 2022 at 7:26 PM #48225

    Daniel Leu
    Participant

    entreprises is not defined. First you have to fetch the content of the respective field in your current record.

    var entreprises = record.getFieldValue('fld-xxx');

    fld-xxx is the value for the entreprises field.

Viewing 1 reply thread

You must be logged in to reply to this topic.