I am trying to use document.getelementbyid(elementid).focus to set the focus to a particular field of a particular occurrence.
I am building the elementid from "ufld:my(new)field.<$entname>.<$modelname>:%%$instancename%%%.%%$curocc("<$entname>")%%%"
This seems to be working okay on the web page version in chrome, and on the android studio emulation, but on my actual android phone, it gets the field correct, but the occurrence is wrong.
Does anyone have any idea how I can identify the correct number to put at the end of the element id?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
Page 1 / 1
I am trying to use document.getelementbyid(elementid).focus to set the focus to a particular field of a particular occurrence.
I am building the elementid from "ufld:my(new)field.<$entname>.<$modelname>:%%$instancename%%%.%%$curocc("<$entname>")%%%"
This seems to be working okay on the web page version in chrome, and on the android studio emulation, but on my actual android phone, it gets the field correct, but the occurrence is wrong.
Does anyone have any idea how I can identify the correct number to put at the end of the element id?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
I am building the elementid from "ufld:my(new)field.<$entname>.<$modelname>:%%$instancename%%%.%%$curocc("<$entname>")%%%"
This seems to be working okay on the web page version in chrome, and on the android studio emulation, but on my actual android phone, it gets the field correct, but the occurrence is wrong.
Does anyone have any idea how I can identify the correct number to put at the end of the element id?
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
------------------------------
The number is a sequence number to add uniqueness, rather than an occurrence number and it is possible for the number to be reused and be out of sequence when occurrences are deleted or changed data is received from the server.
You should be able to use the focus() method on the field objects focus() (rocketsoftware.com)
e.g.
uniface.getInstance().getEntity("myEntity.Model").getOccurrence(3).getField("myField").focus();Kind regards,
Mike
------------------------------
Michael Taylor
Rocket Internal - All Brands
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.