Kom Son Posted July 22, 2021 Share Posted July 22, 2021 Hello, I'm trying to create a new column that populates the values in [clothing_type] column only if the value is equal to the selected value in the document property ${clothing_typeselector} if not, it should leave empty or 0. The data type for all is string but I've tried casting to real with no luck. I have this expression that returns the following error; error: "The expression is not valid after 'then' on line 2" expression: case when [clothing_type] = ${document property for the clothing_type column} then [hobby] else 0 END Please how can I resolve this Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 25, 2021 Share Posted July 25, 2021 Please use: case when [clothing_type] = DocumentProperty("name.of.your.doc.property") then [hobby] else NULL endAnd make sure that your else statement contains the same data type. I guess [hobby] holds strings. So, you want to return NULL or "0" but not 0 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now