Form initial input

Hi

I have four rental properties and in my table there is a column called property, with Enum values of (property 1, 2, 3 and property 4). I have also created slices to be able to see tenants from each property.

I want to automate the initial value of the property based on the form that is used to enter the tenant.

please advice me

Hi @Jack_Ruele!

If I understand correctly, you have 4 slices and then a Form view for each of them to enter tenants. You want to automatically populate the Property information based on the Form being used. Correct?

You can make use of the CONTEXT() function. In the Initial Value of your Property column, use an expression like:

SWITCH( CONTEXT("View")
        "Property Form 1",  "Property 1",
        "Property Form 2",  "Property 2",
        "Property Form 3", "Property 3",
        "Property Form 4", "Property 4",
        ""
)

Remember to replace the “Property Form…” and “Property…” values with those you are actually using in your app.

I hope this helps

1 Like