Uniface on GitHub
Fixes and Updates
I've got a DSP where there's a list of items, Defined as a table.
<tr id="uocc:SUE_SUPPCALL.DUMMY" style="vertical-align:top" onmouseover="uniface.getInstance('SUD_CALL_LIST').activate('opShowNotes',this.id)" >
In the operation, I've been pulling the number off the end of the ID and assuming it was the occurrence number in the entity. However, it appears this is not (always) the case.
Practically I've got a single field to the right of the table I want populated with data based on the mouseover occurrence. So, first question, how can I work out an occurrence number (or find the web ID from inside proc?)?
Second question, is there a better/faster trick for copying the data from a field in the occurrence (not displayed in the html layout) to a field in the page (fixed name, only one occurrence of this field)?
You could also consider setting a custom attribute on the Occurrence
putitem/id $occproperties("myentity"), "html:data-occ", "%%($curocc("myentity") - 1)"
putitem/id $occproperties("myentity"), "html:data-hovertext", hoverovertext.myentity
To answer your first question, you should try using this.getIndex() on the activate which is a function of the Ocurrence object.
Keep in mind that you may need to use this.getIndex() + 1 if you're using setocc on the server side.
I had tried a couple of other things presuming this was a Uniface.occurrence, and they hadn't worked, but I tried with this one and it also returns that this.getIndex is not a function.
© 2020 Uniface Privacy & Cookies | Privacy Statement | Legal