• Resolved Graicifyd

    (@graicifyd)


    If I have a color field – fieldname1

    I want to dynamically change another color field – fieldname3 based on a calculation in a calculated field – fieldname2.

    For example fieldname2 – (fieldname1 + 180)

    Whatever color it gives should be displayed in fieldname3.

    Thank you so much.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    If fieldname3 is a color field, you can use a piece of code similar to the following one to assign the color at the runtime:

    getField(fieldname3|n).setVal('#C00000');

    The previous code assigns the red color (#C00000) to the fieldname3 field.

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Can I set the value to be whatever color is in fieldname2 which is a calculation, So the color is dynamic?

    Something like –

    getField(fieldname3|n).setVal(‘#thecolor in fieldname2);

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    If fieldname2 contains the color code with the sharp symbol, the equation would be:

    getField(fieldname3|n).setVal(fieldname2);

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Thank you for your help.

    The color doesn’t change

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    Please, include the link to the page that contains the form to check your code in action.

    Best regards.

    Thread Starter Graicifyd

    (@graicifyd)

    Plugin Author codepeople

    (@codepeople)

    Hello @graicifyd

    You must edit the equation as follows:

    getField(fieldname8|n).setVal(fieldname9|r)

    Please, note we are not allowed to support any customers in these forums and you are using the Professional distribution of our plugin.

    For pro or commercial product support please contact us directly on our site. This includes any pre-sales topics as well.

    Commercial products are not supported in these forums. We will happily answer this and any other questions you can have on our own site.

    Thank you.

    Thread Starter Graicifyd

    (@graicifyd)

    Alright, thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Color Calculation’ is closed to new replies.