Column depending on another

Options

I have a column that depends on another. Depending on the value that is entered, the other column needs to be automatically filled with a predefined value.
I've been trying to do an endpoint, but isn't working.

Answers

  • Pawel Magdanski
    Pawel Magdanski Member ✭✭✭
    Options

    Can you show your endpoint and at which point there is an issue?

  • Alimama
    Alimama Member
    Options

    I would advise the following steps using the full name from first and last name entered example:

    1. Create a variable that represents the dependent column. e.g. derived_full_name
    2. Write the formula that derives the dependent variable (the dependent column) from the input (entered) value. e.g. derived_fullname = first_name + " " + last_name. Note (first_name and last_name are inputs in this formula)
    3. To add to the table: Map the inputs (first_name and last_name) to their respective columns and the derived variable (derived_full_name) to the right column on the table.

    This way, anytime first name and last name are entered, the full name is automatically entered too in the table.

    See the screenshots of the example below

    1. The table:

    2. The complete function stack:

    3. The formula deriving full name (derived variable) from first name and last name ("entered" - inputs):

    4. The mapping of inputs (first_name, last_name) and the derived variable (derived_full_name) to their respective related columns in the table. See the result on the extreme right.

    The key is writing the formula that derived the dependent variable (column) to the entered inputs (columns) and then mapping both the derived dependent variable and the inputs to the right column. Please let me know if this works for you.

  • Beatriz
    Beatriz Member
    Options

    Thanks for the asnwers!! I was able to do it☺️

  • Alimama
    Alimama Member
    Options

    Glad it helped. Good luck on your project!