Skip to main content
Solved

Software Factory 2021.3 | Validation Datamodel - Domain default value is not between minimum and maximum


Dennis van Leeuwen
Hero
Forum|alt.badge.img+12

After upgrading the SF to 2021.3 we've got the following validation: "Domain default value is not between minimum and maximum” which means that a synchronization to our end application is not possible.
 

Solution
Check the min., max. and default values of the domain and modify one or more of them
 
Related object "No data available”
​​​
Job log information
Error converting data type varchar to numeric
 

How can I find the datatype related tot the validation message to fix the problem? 

Best answer by Mark Jongeling

Hi Dennis,

Looking at the function code, it is strange that you get this error at all:

Numeric check - Return 0 (False)

We do need to take a closer look at this as it's hard to figure out why it suddenly gives these errors. Could you create a TMS ticket for this and supply a backup of your SF database? That way we can find the issue and solve it for you.

In the meanwhile what you can check is all Default, Min and Max values and see if there's any use of Text in any of these fields. Good to check are Datetime fields with a default value of 'getdate()’ ← This should be a Default value expression for example. 

TMS ticket has been created. Current status: On the backlog

View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

3 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hi Dennis, 

These validations check the Domain default value, Element value and the Task parameter default value. It looks like there's a Varchar domain with min and max values. Also in your list of Validations I see the validation regarding Task parameter default value not being between min and max value. Maybe check that one out to see more detail. I suspect that there lies the problem. It could be the case that the domain has changed and that caused all kinds of trouble.

With the following query you can see which Task and parameter is the problem:

select t.project_id, t.project_vrs_id, t.task_id, p.task_parmtr_id, p.dom_id, p.default_value, d.min_value, d.max_value, 
case dt.dttp_type
    when 0 then 'numeric' --Excluded in query but just for overview
	when 1 then 'alphanumeric'
	when 2 then 'date'
	when 3 then 'time'
	when 4 then 'date_time'
	when 5 then 'boolean'
	when 6 then 'binary'
	when 7 then 'guid'
end as dttp_type
from task t
join task_parmtr p
  on p.project_id = t.project_id
 and p.project_vrs_id = t.project_vrs_id
 and p.task_id = t.task_id
join dom d
  on d.project_id = p.project_id
 and d.project_vrs_id = p.project_vrs_id
 and d.dom_id = p.dom_id
join dttp dt
  on dt.dttp_id = d.dttp_id
where p.default_value is not null
  and (d.min_value is not null
    or d.max_value is not null)
  and dt.dttp_type <> 0 --Not numeric

Hope this helps!


Dennis van Leeuwen
Hero
Forum|alt.badge.img+12

Hi Mark,

I've used the query you posted but this resulted in no rules.

Result - 0 rows

I found a domain (e.g. channels_channelcounter) with a Default constant value "0” while no domain element is present.  

Domains
Default constant value “0”

When I check the Usage  we doesn't use the default domain value but an existing element value.

Columns
Default constant value ​​​​​“1”

So I have not been able to solve the validation “Error converting data type varchar to numeric” yet. I would like to hear how I can find out which datatypes the SF is trying to convert from varchar to numeric. 

 


Mark Jongeling
Administrator
Forum|alt.badge.img+23
  • Administrator
  • 3945 replies
  • Answer
  • December 7, 2021

Hi Dennis,

Looking at the function code, it is strange that you get this error at all:

Numeric check - Return 0 (False)

We do need to take a closer look at this as it's hard to figure out why it suddenly gives these errors. Could you create a TMS ticket for this and supply a backup of your SF database? That way we can find the issue and solve it for you.

In the meanwhile what you can check is all Default, Min and Max values and see if there's any use of Text in any of these fields. Good to check are Datetime fields with a default value of 'getdate()’ ← This should be a Default value expression for example. 

TMS ticket has been created. Current status: On the backlog


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