I am trying to setup a kanban for ordering parts.
I would like the kanban tiles to change colour, depending on wether the part has been ordered.
I have a Boolean Attribute "is_ordered"
and a colour attribute "colour_order"
I have written a frontend function to change the colour of colour_order, when the is_ordered status changes:
if (app.get_field_value({F6: 0 ordering.is_ordered}) == true)
{app.set_field_value({F9: 0 ordering.colour_order}, 123 );
} else
app.set_field_value({F9: 0 ordering.colour_order}, 0 );
However, I am not sure on the correct formatting for the colour.
I can make the function change the colour, however, when the user saves the form, the following error occurs:
failed to encode args[0]: unable to encode 123 into text format for varchar (OID 1043): cannot find encode plan
Am I going about all this the correct way, or is the a better way to change the colour of individual tiles?
What is the correct way to define a colour in a function?
Thanks