cancel
Showing results for 
Search instead for 
Did you mean: 

How to Avoid 0 for blank value in Agnetry???

former_member337066
Participant
0 Kudos

Bill Froelich

Konstantin Kulikov

AK K's Profile | SCN

Chandra Ayyagari's Profile | SCN

Stephen Streeter

Leonardo Gomez

Ajitesh Upadhyaya

Volker Saier

Manju Venkatesha

Sahil Dudeja

Hello Experts,

We are working on SAP Work Manager 6.2. We are using SMP 3.0 SP 06. We did development for Android device.

We have Reading screen from which user take current meter reading. And we are comparing Current meter reading with last Meter Reading. If it is less then we are showing message.

Same validation work if user Enter Current Meter reading=0.

But now if user didn’t enter any value in current meter reading then also it showing message.

I think may be blank is considering as 0. Is there any functionality in Agentry we can avoid this scenario.

Current meter reading field is optional.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Ashish,

I totally agree with stephen's statement.

or else you can do following things to achieve the functionality.

Instead of using Reading property as Integral type you can use String property and add a validation rule to check Blank and 0 entry. when you are using String type property (in object as well as in transaction) to prevent user to enter other than numeric value, please select Integral edit type in screen.

hope this makes you clear.

Thanks

Ajitesh

Former Member
0 Kudos

I have a similar issue but this involves dates - transaction validation rule. Any thouhgts on this issue?

see link

Ashish mentioned: "You have a setting in the object property to set blank if the value is not set. I think It will help you to validate the user has entered some value or not." I agree however in my case field B is only linked to Transaction property and not Object property. Field A is linked to object property and the same field exists in the backend app. When field B is updated with new date and Xmit is performed the new value of field B updates field A in backend app through java code. I hope I've painted for you the best picture of the scenario...

sudhiranjan_lenka
Contributor
0 Kudos

Hi Ashish,

You have a setting in the object property to set blank if the value is not set.

I think It will help you to validate the user has entered some value or not.

-Sudhir.

former_member337066
Participant
0 Kudos

Hello Sudhir,

     Can you please attach screen shot for this setting.

      Because as i check it is

sudhiranjan_lenka
Contributor
0 Kudos

Yes Ashish, this is the one. make sure the setting is in the Transaction property.

Do you have a scenario where the current reading can be 0(zero)?

-Sudhir.

former_member337066
Participant
0 Kudos

Yes 0 scenario also there. I tried as per your suggestion but it not working

sudhiranjan_lenka
Contributor
0 Kudos

Hi Ashish,

I would like to understand, it's not working means what's the issue.

On the UI aren't you able to see blank for the first time(first time means if there is no value set as yet or having zero).

we are using WPF client and it's working fine for us.

As you said zero is a valid reading for you, one challenge I can see with this approach, If user wants to edit the current reading which was captured as zero and was not Transmitted yet then user can't see zero it will display blank.

-Sudhir.

Former Member
0 Kudos

Ashish,

How about this:

Have a check field on the screen (default to true) for the user to enter the reading.  If the user is not going to enter they can uncheck the field.  Also, uncheck the option not to show blank while 0. 

This way users can enter in a reading of 0 and if they don't want enter a reading, they can uncheck the option.

Former Member
0 Kudos

If the field you are using for reading is an integer, then it the field always needs a value and platform itself defaults it to 0. 

Former Member
0 Kudos

Ashish,

I believe when you compare blank value with a number, it will always return false. So, manipulate your existing rule to check if value is not blank then compare.

Optionally you can add another validation rule to show user message that Current Meter Reading is blank. Make it Warning or Error as per business requirement.

Regards,

Sahil Dudeja