Skip to main content
Solved

Input constraint Domain is not dynamic

  • July 31, 2024
  • 1 reply
  • 57 views

Forum|alt.badge.img

I created an input constraint for gtin domain like specified in the documentation


But after creation i get an error. When looking into the code it looks like the code is expecting the name of the field instead of the domain. 
The query for the expression returned an error. Check the constraint gtin_size for errors.-->The following query failed with an exception: 'SELECT @p0 AS [input_validation]FROM (VALUES(@p1)) AS t1(collo_gtin)WHERE gtin is not null'-->Invalid column name 'gtin'.Statement(s) could not be prepared.

Best answer by Vincent Doppenberg

Hello @Theo Leijen,

This is an issue in Indicium, it incorrectly uses the ID of the column instead of the ID of the domain. We will release a fix for this issue in the next version of Indicium (2024.2.14.0).

In the meantime, you can work around this issue by using collo_gtin instead of gtin in your constraint expression, but note that you will have to change this back after updating to the next version of Indicium where we have fixed the problem. Alternatively, you could also rename the column to gtin or the domain to collo_gtin, so both IDs are the same. This way it will remain working without any changes after updating your Indicium, however this change might be less desirable.

You could also avoid using a SQL input constraint altogether and use a Regex input constraint instead. Whether this is possible or not depends on the specific expression, but in many cases both types are possible. The issue that you are experiencing does not apply to Regex input constraints and furthermore, Regex input constraints are faster than SQL input constraints.

I hope this helps.

View original
This topic has been closed for comments

1 reply

Forum|alt.badge.img+4

Hello @Theo Leijen,

This is an issue in Indicium, it incorrectly uses the ID of the column instead of the ID of the domain. We will release a fix for this issue in the next version of Indicium (2024.2.14.0).

In the meantime, you can work around this issue by using collo_gtin instead of gtin in your constraint expression, but note that you will have to change this back after updating to the next version of Indicium where we have fixed the problem. Alternatively, you could also rename the column to gtin or the domain to collo_gtin, so both IDs are the same. This way it will remain working without any changes after updating your Indicium, however this change might be less desirable.

You could also avoid using a SQL input constraint altogether and use a Regex input constraint instead. Whether this is possible or not depends on the specific expression, but in many cases both types are possible. The issue that you are experiencing does not apply to Regex input constraints and furthermore, Regex input constraints are faster than SQL input constraints.

I hope this helps.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings