Thomson S
12th March 2013, 11:43
Hi,
I have created a session having multioccurence form. I have set the occurences as 2 in the form. While running the session, i need to allow the user to select mark only one record at a time. Two records should not be marked at a time by clicking on two records by pressing 'shift' button. Only record should be marked at a time, how can i do this?
Please help me.
BaanInOhio
12th March 2013, 14:55
You have to do it in the program script within the 'mark.occur' choice. You can add code to check "marked" (predefined variable, indicates if any records are marked) and "number.of.marks" (predefined variable, number of marked lines) and disallow the mark (choice.again()) when number of marks > 1. You can also post a message before choice.again() telling the user to 'mark only one record' if needed.
Thomson S
13th March 2013, 04:39
Hi,
Thanks for your reply. I couldnt find 'number.of.marks' in predefined variables in my Baan help. Is there any other work around to know the number of marked records.
Thanks in advance.
günther
13th March 2013, 11:20
Hi,
here is a an example:
long i, n
n = 0
for i=1 to filled.occ
if mark.table(i) then
n = n + 1
endif
endfor
| n now contains the number of marked occurances
BaanInOhio
13th March 2013, 13:26
Hi,
Thanks for your reply. I couldnt find 'number.of.marks' in predefined variables in my Baan help. Is there any other work around to know the number of marked records.
Thanks in advance.
Sorry, I was probably thinking Baan5c. Checking 'mark.array' in a for structure is the other way.