Natasha
14th August 2003, 16:47
Hi,
I have a problem with synchronizing. What a way to put variable (not a main table field) in parent process?
I used set.synchronized.dialog()

lbencic
14th August 2003, 18:14
Do you mean, having a variable on both the parent and the synchronized dialog, and it not refreshing when you come back to the parent? I have not tried this, but I am thinking that the 'synchronization' is only acting on the main table. Read up on this here:
Synchronized Session Overview (http://www.baanboard.com/programmers_manual_baanerp_help_functions_synchronized_sessions_overview)

What you are doing with the 'set.synchronized.dialog' command is a 'Dialog synchronization'. To get the variable back and forth, you may try the old Import (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_import) and / or Export (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_export) of the variable back and forth between the main and the sub. You might also consider manually making it 'Child synchronization' as described in the link - check out the sample program at the bottom of the page.

I would try import / export first though, and then display all occurances when you get back to the main session.

lbencic
14th August 2003, 18:19
O I just saw on your profile that you are on Baan IVc4, is that correct? Synchronization is only availabe in Baan V and up. Import and Export are available in Baan IV though.

NPRao
14th August 2003, 19:31
You can also use -

put.var() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_put_var)

put.indexed.var() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_put_indexed_var)

get.var() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_interprocess_transfer_get_var)

at.base() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_variables_based_at_base2)

Natasha
15th August 2003, 09:08
lbencic, I am on Baan V, I'll change my profile

I tried export(), but variable do not refresh immediately when I got back to the main session. What section I have to use execute(first.set)?

Natasha
15th August 2003, 09:14
Why the form has not buttons "Save and Exit", "New" if the Zoom type of session Synchronized dialog?

lbencic
15th August 2003, 18:41
Hmm what section. I have not tried, but from the looks and the description, the after.update.db section may be it. Whenever the user chooses 'save' in the child, the parent display updates. Really, you don't need to call the first set command so much as make sure your variable gets correctly updated in it's before display section. For this you need to have passed something from your child session, and know what occurance it matches to. I have done this by saving arrays for those fields, and related the array to the form occurances, so in the before display section I fill the value from the array.

Do you mean the Parent does not have those buttons, or the child. The parent should have all the db control buttons. The parent's update section gets called when you choose 'save' in the child. That's why the child does not need those buttons, the parent button acts on it. When you choose 'new' in the parent, the child saves and begins a new insert. That's the sync part.

If the parent does not have the buttons, then something is not right with your session type or form options.