baanuser2003
30th April 2004, 02:54
Iam having a serious problem and Iam forced to do something ...

Well, I have a form type 3 session.
The user wants to select certain rows and update certain information of the selected rows to a table.

I achived this by using

choice.cont.process:
on.choice:
for i = 1 to filled.occ
do.occ(i,insert.table)
endfor

it inserted records..... But if the user chooses the down arrow key the previous occurances are vanished.... How do I solve this problem????

Also If I try to sue arrays.... say for example... the user choosesfirst 5 records and scrolls to the end of the screen ... toand chooses another 5 records... and now I decide not to choose the first 5 records.... whats happenning is it retains the last the ones that are unchked but the data is lost. If I choose 10 and say I change my mimnd before hitting the cont button to go back... and cancel one of them... it stores... 5 records instead of 10 how do I solve.. anyone pls help

vahdani
30th April 2004, 18:23
Hi,

in such cases and exactly for the reasons you mentionend I use a temporary table. This table then has all the fields of the main index on the table you want plus one extra field with tcyesno domain.

I then generate a maintain session for this temporary table where the user can do his/her selection using the tcyesno field. I can also display other fileds of the real table in the session so that the user does not have to notice anything amiss.

When the user then makes a choice or presses a Button then I go thru the table and process all the records with the tcyesno field set to yes.

This is not as complicated as it sounds and works always like a charm :)

[PS: you could if you wanted add this extra field to the main table but some people don't like the idea of changing standard baan tables :rolleyes: ]

baanuser2003
30th April 2004, 18:35
I tired using the temporary table concept. It does not work...

Well, it has to be done on the choice.mark.occur .....

Its like the user will open up the display session.... he will see all the records...

then presses the CTRL KEY AND Highlights... one after the other...

all these can be captured....using mark.occur ... but since the filled.occ has the value of 11 ... its very confusing and cumbersome... Hope u understand my problem....