Can I change column data type based on a value entered earlier on same form?

I have a column named SCOPE_NO. If a user selects either SCOPE_NO=1 or 2, then I want the COUNTRY_GEO_NO to be ENUM not an ENUMLIST. In other words, the user should ONLY be able to select ONE country. If SCOPE_NO>2, then the user can select multiple countries.

Is this possible?

Yes and no. So you wouldn’t actually change the column type but you could find a way to limit them to 1 selection. They would still be able to select more than one but it would be invalid.
Way of doing this: IF(SCOPE_NO=1,COUNT(Enumlist column)=1, true)

2 Likes

Thanks Austin,

Would that be in the ValidIF of the column I want to limit to one value?

IF(SCOPE_NO=1,COUNT(Country_Geo_NO)=1, true) gives me an error: Count function used incorrectly.

[Country_Geo_NO] is an EnumList with base type REF.

Maybe try surrounding the [Country_Geo_NO] in LIST()?

This:

IF(SCOPE_NO=1,COUNT(Country_Geo_NO)=1, true)

should be this;

IF([SCOPE_NO]=1,COUNT([Country_Geo_NO])=1, true)

or this;

OR(([SCOPE_NO] <> 1), (COUNT([Country_Geo_NO]) = 1))
2 Likes