cancel
Showing results for 
Search instead for 
Did you mean: 

DP Macro Help: Value Validation

Former Member
0 Kudos

Hi,

I need assistance in the macro operators and logic to write a DP macro that validates a key figure value follows these rules:

Numeric only

6 numbers long

First two digits must always be: 20

I'm guessing there are standard things to check each of these?

Thanks in advance..

Accepted Solutions (1)

Accepted Solutions (1)

RahulHanda
Active Contributor
0 Kudos

Hi S SB,

Numeric is always part of defining the KF (i.e. Info Object itself), so I hope you have defined it correctly.

With 6 numbers and starting with 20 means the value would be in range of 200000 ~ 209999. For the same see the attached macro and its effect.

I hope this fulfills your requirement and confirm the same.

Regards

Rahul

Former Member
0 Kudos

It looks great Rahul, as with all macros there is always a simple way if you get it sorted in your head first.. And you did that, Thanks, I will build and test today and hope to return later to flag this as correct answer and reward points.

SS B

Former Member
0 Kudos

hi,

The macro as screen shot by you is not working.. it seems to have no effect..  I will stick with your logic and try to adjust it slightly.. I have other priorities at the moment. so it may be a while before I return to this. added a helpful vote for now.

RahulHanda
Active Contributor
0 Kudos

Hi S SB,

The effect would be it would change the color of the cell to green or red (mentioned as an example). If you want to throw message then you can use process message functionality.

Let me know if it worked.

Regards

Rahul

Former Member
0 Kudos

Hi there.. Update for you.. Yes I have it working now. I was also trying to use CON_INITIAL and I had a setting wrong there. Once I got that sorted it was correctly deleting the value entered if it didn't meet the criteria.

Correct answer awarded.

Answers (0)