Page 1 of 2
Numeric Fields by mobile Apps
Posted: Tue Oct 29, 2013 4:13 pm
by kfritz
Hi everybody,
Is there an opportunity to use a numeric keypad for numeric fields by mobile applications?
Thanks,
Karl
Re: Numeric Fields by mobile Apps
Posted: Tue Oct 29, 2013 4:15 pm
by Scott Klement
I believe it'll do that automatically... HTML5 has an attribute on textboxes that we are putting into the page that should tell the mobile device to bring up the appropriate keyboard. Is it not working for you?
Re: Numeric Fields by mobile Apps
Posted: Tue Oct 29, 2013 4:25 pm
by kfritz
Thanks Scott,
I'll give it a try.
Re: Numeric Fields by mobile Apps
Posted: Thu Oct 31, 2013 8:43 am
by kfritz
Scott,
It's ok.
Questions about the mobile client.
1) What is the parameter for? Found nothing in the docs.
2) Is it possible to disable the device orientation by the client?
(I know the option of Phonegap/manifest.xml)
Thanks,
Karl
Re: Numeric Fields by mobile Apps
Posted: Thu Oct 31, 2013 9:08 am
by Scott Klement
Sorry, at this time if you wish to control which device orientations are allowed, you would have to use PhoneGap. If this is important to you, you may wish to place a feature request.
The parameter field is a parameter that is passed to your initial mobile program.
We had many customers ask how to have more than one mobile app that's started from the mobile client's menu. The parameter was added to allow this. You see, we could not let the mobile client specify a program name, because this would be a security violation (any user could specify any name they wanted, this would be a big security problem.) So we needed a different way to distinguish between different mobile start up options. We decided that we'd allow a parameter, instead.
Your start up program could then be a simple CL program that does something like this:
Code: Select all
PGM PARM(&OPT)
DCL VAR(&OPT) TYPE(*CHAR) LEN(20)
IF COND(&OPT *EQ 'opt1') THEN(DO)
CALL PGM(PGM1)
ENDDO
IF COND(&OPT *EQ 'opt2) THEN(DO)
CALL PGM(PGM2)
ENDDO
ENDPGM
So this makes it easy to allow you to start different apps based on the parameter that's passed from the mobile client -- and lets you have as many different mobile apps as you wish.
Re: Mobile Apps and date fields
Posted: Wed Nov 06, 2013 5:42 am
by kfritz
Let me extend my primary question about date fields in mobile apps.
The numeric key pad is working fine within mobile apps.
But what's about date fields? If I set a date field, I get the small icon and the small calendar that will be showed. Selecting a date (small fingers are a real plus), the alphanumeric keyboard pops up too (not neccessary). Do you think about a more applicable track for mobile devices or have you another solution for mobile date fields?
Thanks,
Karl
Re: Numeric Fields by mobile Apps
Posted: Wed Nov 06, 2013 10:07 am
by Scott Klement
Karl,
Try using a normal textbox and setting the 'input type' property of the textbox to "date". This will force it to use the HTML5 date type, which should cause the mobile device to bring up it's mobile date selection tool.
Re: Numeric Fields by mobile Apps
Posted: Wed Nov 06, 2013 10:47 am
by kfritz
Scott,
This works under these circumstances:
a) do not use the mobile client
b) ignore all formattings
If I use an european date format (value property = date/german/tt.mm.jjjj) the input field will be shown as JJJJ-MM-TT (like the field def). This causes an error of a wrong date format.
I called the program by mobile Mozilla Firefox as a website.
Device: Nexus7, Android 4.2
These are my first tests.
Thanks,
Karl
Re: Numeric Fields by mobile Apps
Posted: Wed Nov 06, 2013 10:58 am
by Scott Klement
When you use 'input type' to set the type to date, then you are using a feature of HTML5. It's not a feature that Profound wrote or has control over, we are just outputting an input tag with the HTML5 type="date" attribute.
The HTML5 spec requires that the date be sent over the wire in yyyy-mm-dd format. (I guess that's jjjj-mm-tt in German?)
The user will not see the date in that format if the browser is HTML5 compliant, it should show a date picker that allows them to work with the date nicely, etc. But the yyyy-mm-dd is the format required to be stored/read from the textbox in your program code.
Re: Numeric Fields by mobile Apps
Posted: Wed Nov 06, 2013 3:58 pm
by kfritz
Scott,
You're right this means YYYY-MM-DD. Do I have accept that I can't show the date as our natives do or have you a hint for me to convert the date correctly?
Thanks,
Karl