Conditional Insert data from form

I'm trying to create a conditional insert value.

I have a form with a select field with 2x values "Parent" and "Child". When you select Child another select field pops up with all the values for 'Parent' records and you need to select a parent. When this value is inserted into the DB the value should contain either Parent or the value from the child select.

The below is my attempt of the string used to insert the values into the DB. select8 being the Parent/Child and select17 all the Parent values.

{{select8.value != 'Child'}} {{select8.value = 'Child'|| select17.value}}

Hi @kowuspelser,

I think what you want to insert is this value:

{{ select17.value ? select17.value : select8.value }}

What it means is if select17.value has some non-null value then use it. Otherwise use select8.value. It is quite common in programming to check if a value has something. If not, then use some placeholder.

Also, for the select17 component you may conditionally hide it by setting Hidden value in the Apperance section to {{ select8.value !== "Child" }}

Hope this helps