garlapati
1st April 2009, 09:44
Hi,
When i am inserting a new record for a session with main table(no script), previous record values are repeating for each field by default. What i need is the "" or 0 values for when i press new button. what should i do. if i need to use db.set.default where should i write? i write it in add.set: before.choice.
But when i say new button its giving message to give value for new group fields also.
What should be done to not to repeat previous record values?

Regards
Sunil

sandeepsharma
1st April 2009, 12:29
Hi,

Use blank.all() command.

choice.add.set:
on.choice:
blank.all()

garlapati
1st April 2009, 12:54
Hi sandeep,
using blank.all() clearing the entire form & previous records are not appearing. More over the new record still getting previous 1record in the form. Its not working :mad:

sandeepsharma
1st April 2009, 13:13
Hi Sunil,

ok..that means you are using a multioccurence session.blank.all() wrks for a single occurence session

Specify the value of the fields in on.choice section of add.set choice i.e. for string variable "" etc.this will solve the problem.

sandeep

amitmmokashi
1st April 2009, 13:26
Hi,
You can use the predefined variable attr.dorp = 1 in the before.input section of the concerned field.

Regards,
Amit

garlapati
1st April 2009, 15:14
i did try attr.dorp. earlier same questions asked by some body. i found the answer in it. its working. But one more issue is on the multi occ session let's say i have 3fields. i enter value for 1st field, then go to next field & give value. in the 2nd field if the value is not unique from previous record value i get error message by default. if i say ok its clearing the entire values & cursor is on 2nd field only. the error checking is done default by table level. i did not write any code. so now i want either cursor move to 1st field / 1st field value should not be cleared. how do i do this?

thanks for answer
Sunil