vaishali_sftdev
17th May 2008, 08:52
Hi,

I am refreshing session using execute(find.data) in after.choice of mark.delete section. Session is of Maintain type.

And similary in another session of type Maintain only, i am refreshing using execute(find.data) after calling a function for inserting multiple records at the same time from a file in on.choice section. But data is not refreshing. i have to either manually refresh or navigate or exit and then again execute the session.

What may reason behind it? And what can be possible solution for it.

rahul.kolhe22
17th May 2008, 14:47
Hi,

I am refreshing session using execute(find.data) in after.choice of mark.delete section. Session is of Maintain type.

And similary in another session of type Maintain only, i am refreshing using execute(find.data) after calling a function for inserting multiple records at the same time from a file in on.choice section. But data is not refreshing. i have to either manually refresh or navigate or exit and then again execute the session.

What may reason behind it? And what can be possible solution for it.

Hi,
I think that you might be calling the function on pressing some form command. If so then for the form command, if we double click the form command, go to it's second tab "Execution", there in the last group box "After execution" which has a check box "Refresh Parent". Ticking this check box may solve your problem.
The code for refreshing the data is written in on.choice section, I think that the refresh action might be executing before the insertion of the record is done in the table, so the new records are not getting reflected on the session.

One more thing I am not able to understand, for refreshing why are you using execute(find.data). I use refresh(), refresh.all.occ(), refresh.curr.occ(), refresh.parent() functions.

vaishali_sftdev
19th May 2008, 09:28
Rahul,

Thanks a lot for reply.
Deletion problem yet not solved even i used refresh() function. After deleting record is gone. I have kept one condition on add.set according to which no new record can be inserted if one exists for that key value. So, i want that immediately after deleting the record when i click on add.set, i should be able to insert the record. Since, the condition should become false. But this is not happening, since it isnt refreshing the form.

pconde
19th May 2008, 14:32
Hi,

you can try 2 things:
a) after the delete: call execute(find.data) this should refresh the entire form and also generate an update
b) after the delete: do a refresh.curr.occ() this should refresh the current record and if it is deleted I suppose that the code should take the next

Regards
Philippe

vaishali_sftdev
20th May 2008, 06:41
Philippe,

In after.delete, refreshing the form by writing execute(find.data) is giving error: recursion not yet implemented.
And when i am using refresh.curr.occ() instead of execute(find.data), gives message: Record not found.
:confused:

belle_dev01
20th May 2008, 08:29
Hi,

You can try execute(first.set) instead of execute(find.data).

vaishali_sftdev
20th May 2008, 08:40
Hi,

Thank you Philippe & Belle for replies.

The problem is solved. It was my mistake, I had wriiten that condition wrong to restrict insertion once there is a record in the table. After correcting it, I found that refreshing explicitly is not required.