on 03-12-2008 8:32 AM
Hi,
I was trying to build a validation for checking the change in Price.
My setup
Price is a Qualifier and Amount is a Currency field in the Qualified lookup table.
Requirement : When I modify a Item master record and change the Price value, need a validation to throw an error or warning for a Price change greater than 10% from the existing value.
I was trying the following, but it does not work correctly.
IF(Price Information.Amount>(Price Information.Amount)*1.05),TRUE)
Regards,
Vijay
Yes, you can
To be able to compare original price and new price, you need to checkout your record and use an expression like this
IF(Price > [Original].Price*1.15, FALSE, TRUE)
You can select the original field from "Fields" menu.
Regards
Rafael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have tried the options mentioned in the thread here. I'm using SRM MDM Catalog. When I try to run this check
IF((Price Information.Amount-[Original].Price Information.Amount) > 10,FALSE,TRUE)
The IF condition goes to the ELSE condition and sets the Flag to TRUE always.
When I tried to use
IF((Price Information.Amount-[Original].Price Information.Amount) = 0,FALSE,TRUE)
It always sets the flag to FALSE. That shows the result of subtraction is always "0". Not sure why this is happening.
If I use another field, that is not a qualifier, this logic works fine very well.
IF((Delivery Time In Days - [Original].Delivery Time In Days) > 10,FALSE,TRUE)
Is there a limitation with SRM MDM Catalog working with a Qualifier?
Regards,
Vijay
Hi Vijay,
Validation always use the current value of a field. This means that your validation will always return false, as "Price Information.Amount" is always lower than "Price Information.Amout * 1,05". You cannot solve your requirement with this kind of validation as you cannot compare the new value with the old value this way.
BR Michael
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
As Micheal said, that your Validation cant be used as MDM uses the laetst value and your Validation will always be false.
However, I can suggest you 1 Workaround, try if its working:
1. Create a Workflow which automatically gets launched on any updation.
2. Checkout the Records in the Start Stencil. ( This will make a back up for all the values)
3. Create a Validation which will pass those records in which your Particular field ( say Field1) has been updated.
4. Assign the current value of your field( Field 1) to another Field ( say Field 2)( You will have to create this in order to compare later on).
5. Then Check in the records to get the updated value in your original field ( Field1).
Now you can compare the 2 fields as they have the old value and the Updated value in a Validation.
I hope this Works. Try it out.
*Please reward points if found useful.
Thanks and Regards
Nitin jain
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.