cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing zero using an Integral Number field - Agentry

Former Member
0 Kudos

Hi;

I am working on SAP Work Manager 6.0 customising using Agentry 6.1.4.179. I have a requirement to capture zero as a reading value on an edit transaction. I am implementing this using an Integral number field, on the property setting for this field I have maintained the setting to clear zero on display. Now there is 2 sides to this, Firstly, with this setting maintained, even when a value of zero is captured by the user, this setting automatically clears the 0 maintained by the user, even after saving. Secondly, when this setting is not maintained, because I am completing the object on 0 being captured, all objects then load with a completed status, somehow because the initial zero was not cleared all objects load with an initial reading of zero and this 0 cannot be cleared. I have tried different ways of clearing it, with no success. Automatically the integral number field seems to load either with a zero or without the zero and this does not look like it can be changed even with rules. How can I capture a zero on an Intergral field without the property loading with a default zero stored?

I've been considering using a string property/field, but this would require a validation rule to check if input string is numeric, is this really my only option of archieving this?If so, is there possibly a sample of such a rule?

Thanks in advance!

Sizo Ndlovu

Accepted Solutions (1)

Accepted Solutions (1)

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

I am not following your problem.  That object parameter to clear zero just blanks out the display, not the actual zero in the object property.  Why is this causing you a problem?  Why are you blanking the zero when you want the user to be able to enter a zero reading?

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason;

I am blanking out the zero because the reading can be any number including zero, hence when capturing a number, the user does not first have to delete/backspace the zero, but only input the reading (this reading could be zero).

Not blanking out the actual zero in the property is a problem in that, the property load with a zero already after sync and I am using a rule to check and complete the object if it has a recording of zero or any other number, this then means that all objects after sync load on the device with a complete status before even capturing any readings.

Blanking out the zero somehow clears any zero reading that the user captures.

What I have tried to do is to complete the object on an AND rule with a condition of the reading being zero and isEdited=true, but now the issue comes on a scenario when a user views an object on the edit transaction screen and doesn't want to capture anything, but leave the object incomplete, because the zero is not cleared in the object property, this means that the object will be completed irregardless of the user deleting the displayed zero.

Its a slightly hard one to depict, but I hope its clear what I am trying to archieve and the challenges that I am having.

Thanks and Regards;

Sizo Ndlovu

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

Change it to use a string instead of a numeric property for input, then include a JavaScript validation rule that makes sure the user entered a valid number or an empty string for no reading.

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Jason;

I was really hoping that I could get to a resolution using the Integral number field, but somehow I had it at the back of my mind that I could only possibly have it done the way you have suggested.

I think that in the future, it would be helpful to have the Integral number behave like a string only when its empty rather than defaulting a zero when its empty.

Thanks and Regards;

Sizo Ndlovu

jason_latko
Advisor
Advisor
0 Kudos

Sizo,

Please mark this as answered.  Thanks,

Jason Latko - Senior Product Developer at SAP

Answers (0)