Hi All,
I have an Integer field in the Qualified table.
Name-> Non Qualifier -> Type Text
Code -> Qualifier -> type Integer
Now, i need to write a validation which throws error If user enters a number whose length is less than 4 or greater than 4.
The business requirement is User should enter Exactly 4 Numeric values. Not less and not more.
As integer type field done not control Field length i have written a validation.
I have written a validation..
IF(IS_NULL(MAINLOOKUP.Code),1,IF(LEN(MAINLOOKUP.Code)<4 , 0 ))
But this is not working.
this works for a Normal Integer field which is in Main table, But this is not working when Code field is in Qualified table!!!
Is this the normal Behaviour of MDM??
Or am i missing something!!!
Experts please provide your suggestions.
Note: i changed the Code field to Text and made length as 4 in field property, But this is not controlling if user keys in only 2 values.
So written the above validation on text field as well, But it does not work.
Kind Regards
Eva
Hi Eva,
Validations does not work on qualified table links (It will work bydefault only on 1st link/record of your qualified table)
Create Tuple instead. In Tuple you will be able to restrict length of your tuple field.
Thanks & Regards,
Mahi
Hi,
Thanks for the update.
It worked in Tuple.
But i have written a validation for a Qualified Field called Weight (qualifier).
On main record level there is One more weight field.
So the validation is , Per record IF main table field weight = sum of Weight (Qualifiers )- Which means Sum of weights, all QLinks within that record.
and It worked.
Iam a bit confused now, Is there any rule like in Qualified tables we can validate these and we cannot validate these...!!!!
Please help me in understanding the Concept.
Kind Regards
Eva
Hi Eva,
I think it works for group functions like Count, Minimum, Maximum, Average, Sum, Has Any Value etc
Thanks,
Mahi
Can anyone help me in providing a logic behind the Validation working on Qualified table.. Like which Type of Validations work and Which will not!!!!
Kind Regards
Eva
Hello Eva
This problem is old as our world ![]()
Validation has some limitation for work with qualifier table
From validation you can check count of records in qualifier
For example you have qualifier with two fields code and value.
if you have some record and in your qualifier you have like as:
ps = 125
pp = 188
pd = "FFF"
pn = "DDD"
if you select code
you will get next string
4:ps;pp;pd;pn
The same if you will get name
4:125;188;"FFF";"DDD"
you can get count of records in your qualifier it's =4
theoretically you can use "has any values..." etc. in your validation
that is all
p.s. you can check this functionality from assignment
Regards
Kanstantsin Chernichenka
Edited by: kanstantsin_ch on Sep 27, 2011 1:24 PM
Hi,
I am pretty sure that We cannot Write Assignment result value in a Qualified table field.
Now validations can be done across main and Qualified table.
But like mentioned in the previous posts Not all MDM validation functions can be executed (though MDM did not specify a list of functions which work and which will not!!!! )
am i right!!!
Kind Regards
Eva
Hi Eva,
But like mentioned in the previous posts Not all MDM validation functions can be executed (though MDM did not specify a list of functions which work and which will not!!!! ) am i right!!!
Yes, you are right. There are lots of limitations on Qualified
Please go through this complete below thread for more details.
Workaround on all the limitations of Qualified Lookups, Multivalued Tuples.
Regards,
Mandeep Saini
Hello Eva
"you can check this functionality from assignment"
you didn't get my point, sorry ![]()
I mean, you can create some additional text field in your main table and use assignment for thta fields for checking your validation expressions(for qualifier) how they are working and which results you will get
You are exacly right you can't use assignment for set values into qualifier
Regards
Kanstantsin Chernichenka
Hi,
If we write a assignment checking the values in Qualifier links and writing the result in maintable field.
Then the Result field in maintable will the result of last Qualifed link validation result. This is wrong!!
When we want to see each qualified link assignment result we cannot do it by creating a Field in maintable.
Kind Regards
Eva
Hello Eva
Ok
Just imagine
you have some record in your main table with some QLUT
Qlut contain next fields
item_name - type text
item_value - type integer qualified = yes
and list of values
q1
q2
q3
q4
your main table contain next fields
name-text
Qlut->your Qlut
qlut_code->text
qlut_value_>text
For qlut_code create assignment like Qlut.code
For qlut_value create assignment like Qlut.value
add some records to main table like this:
name=test1
in qlut select next:
item name =Q1
item value=1
item name =Q2
item value=2
item name =Q3
item value=3
and another one record in main like this:
name=test2
in qlut select next:
item name =Q1
item value=1
item name =Q3
item value=3
item name =Q4
item value=4
item name =Q3
item value=33
select both records and run both assignments
If your assignments is correct
In first main record you have got
qlut_code=3:Q1;Q2;Q3
qlut_value_>3:1;2;3
for second main record you have got
qlut_code=4:Q1;Q3;Q4;Q3
qlut_value_>4:1;3;4;33
Then you can use records values from qlut_code and qlut_value for validation
This is work fine.
I hope, you have got my point
Regards
Kanstantsin Chernichenka
Edited by: kanstantsin_ch on Oct 6, 2011 1:35 PM