Ankita Patel
29th March 2013, 06:04
Hello,
I am getting error "function.marked.is.not.supported.with.tiv.1075.or.higher'." while using predefined variable "marked" in UIScript.
what is the solution ??
NikeNiek
29th March 2013, 11:12
Hi,
You can use the function sel.num.selected(), this function returns the number of records that is selected in the session.
Regards,
bdittmar
29th March 2013, 13:47
Hello,
I am getting error "function.marked.is.not.supported.with.tiv.1075.or.higher'." while using predefined variable "marked" in UIScript.
what is the solution ??
Hello,
here are some hints.
In Infor ERP LN there are two ways for the tools to handle
record selections in overview sessions.
The first way of handing record selections is limited and
not like other Windows applications.
The second way is improved and more like other Windows
applications.
How the tools handle the selection for a session depends
on the Tools Interface Version (TIV) version of session's script.
If the TIV version is equal to or higher than TIV 1075 the improved way
is used, otherwise the non-Windows way is used. For sessions that have
code for handling record selections in the program script, work should
be done when moving to a TIV of 1075 or higher. The type of changes
are described in the Improved Record selection Cookbook.
The most important features the improved selection mechanism introduces are:
using the Shift and Control keys to extend the selection
scroll through the selection
tools functions that make it easy to make a session that uses the selection of its parent
a Select All ( 4GL choice sections ) standard command
constistent execution of the mark.occur sections
Note
Improved record selection functionality is available from Tools Interface Version (TIV)TIV 1075.
--------------------------------------------------------------------------
Record selection Synopsis
void do.parent.selection() (function_name [, ...] )
void do.selection() ( boolean mode, function_name [, ... ])
void mark.occ() (long occurrence [, boolean addToSelection ]) Different behavior and an optional parameter addToSelection is available from Tools Interface Version (TIV)TIV 1075.
void remove.mark() ()
boolean sel.add.parent.tables() ( long group_id, string parent_table(8) [,string parent_table2(8)[, ...]]) Available from Tools Interface Version (TIV)TIV 1075.
long sel.num.selected() () Available from Tools Interface Version (TIV)TIV 1075.
long sel.parent.num.selected() () Available from Tools Interface Version (TIV)TIV 1075.
boolean sel.use.parent.selection()
--------------------------------------------------------------------------
Improved Record selection Cookbook
Introduction
When moving a UI script from a Tools Interface Version (TIV) level
below TIV 1075 to TIV 1075 or higher, rework might be needed because
the 4GL engine uses a new record selection mechanism. Rework may be
needed when one of the following variables or functions is used:
marked doesn't work anymore
unmarked doesn't work anymore
mark.table only reflects the state of records that are visible in the window. Note that with TIV higher than 1075 there can also be records selected that are not visible, but are scrolled out of the window.
choice.global.delete doesn't work anymore
mark.occ() behavior has changed, see mark.occ()
So in case the above variables are not used, no rework is needed.
There are a couple of scenarios in which the above variables are used.
The most important ones are mentioned below.
Use mark.occ to append records to selection
When you want mark.occ() to append a record to the selection, specify true for the second argument of mark.occ . E.g.:
mark.occ( 1, true)
The behavior has changed because in most cases the application expects that only one record is selected after a find.data and a mark.occ. An example of such a construction is:
execute(find.data)
mark.occ( 1)Transfer selection to print/processing session
In different ways selections are transfered to child sessions for processing or printing. In all cases mark.table is used. In most cases this construction can easily be replaced by the use of do.parent.selection() in the child session.
Do a check in choice.mark.occur
There were three ways to check whether a record is selected in the after.choice section of the mark.occur event and act on that:
choice.mark.occur:
after.choice:
if mark.table(actual.occ) then
some.check()
endif
or
choice.mark.occur:
after.choice:
if marked = actual.occ then
some.check()
endif
or
choice.mark.occur:
after.choice:
if not unmarked = actual.occ then
some.check()
endif
All these constructions only work if the choice section is executed for every record that is selected. With a TIV level below 1075 this is not the case when the user selects a range of record. With a TIV level of 1075 or higher the choice section is executed once for every mark action. So it is executed once when the user selects one record, and it is executed once when the user selects range of records (e.g. by using the a shift-click). Therefore, at least when moving to a TIV level of 1075 or higher, these constructions should be rewritten to something that uses do.selection(). E.g.:
choice.mark.occur:
after.choice:
do.selection(false, some.check())
Process selected records or enable/disable commands in mark.occur section
To process selected records a construction like the following is used. The same is also used for determining the state of commands after a user selected a record.
for counter = 1 to filled.occ
if mark.table(counter) then
restore.rcd.main(counter)
do.it()
endif
endfor
In both cases the construction must be replaced by a construction that uses do.selection(). E.g.:
do.selection(false, do.it)
check whether any record is marked
In some cases the value of the variable marked is used to determine the whether there are any records selected. On these places the function sel.num.selected() must be used.
Regards
Ankita Patel
30th March 2013, 07:21
Hello,
Thanks,Error is Resolved . I use sel.num.selected() and it works fine with my Script