cancel
Showing results for 
Search instead for 
Did you mean: 

Validation method for Price change

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

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

0 Kudos

Sorry, I forgot to escape \[ and \] chars

IF(Price > \[Original\].Price*1.15, FALSE, TRUE)

Former Member
0 Kudos

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

michael_theis
Active Contributor
0 Kudos

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

Former Member
0 Kudos

Michael,

Is there an alternate method for checking the Price change validation as per my requirement?

Regards,

Vijay

Former Member
0 Kudos

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