Babu Nagarajan
1st September 2016, 10:51
Hi Friends,

I have written a script in which I call a standard session for which I do not have source code. I am using attr.zoomsession in the "before.zoom". I need to pass a value from the parent session to the child session. If someone can help me with syntax it would be great.

I have used the below syntax to zoom.

attr.zoomcode = z.session
attr.zoomsession$ = "tipcf1501m000"
attr.zoomreturn = "tipcf100.cpft"

Thanks
Babu Nagarajan

srprks
1st September 2016, 11:33
You can use import to get the standard sessions field value like

import("tisfc001.pdno",tisfc001.pdno)

Babu Nagarajan
1st September 2016, 11:40
Hi,

I need to export a value from my session to the standard session.

I tried export("tipcf1501m000.item",item.f). It did not display the item.f on the standard session, It was displaying the 1st record from the table.

Babu

srprks
1st September 2016, 12:53
is your requirement is to get the filtered records after zooming on a particular field you can use query.extend.where.in.zoom

e.g.

field.tejzw101.orno:
selection.filter:
query.extend.where.in.zoom("tejzw100.item = " & quoted.string(tejzw101.item))
| quoted.string() is used here, because the value of tejzw101.item might contain (double) quotes.

mark_h
1st September 2016, 14:05
If you included an export in your session then you will probably need to include an import on the standard session. If you don't own source code then you might have to find an alternate way to do this. For our 4c4 we do things like this using qkey. I also do not believe query.extend functions are available in 4c3 - per the post and the OP profile.

manish_patel
1st September 2016, 15:31
Hi Friends,

I have written a script in which I call a standard session for which I do not have source code. I am using attr.zoomsession in the "before.zoom". I need to pass a value from the parent session to the child session. If someone can help me with syntax it would be great.

I have used the below syntax to zoom.

attr.zoomcode = z.session
attr.zoomsession$ = "tipcf1501m000"
attr.zoomreturn = "tipcf100.cpft"

Thanks
Babu Nagarajan

Check below piece of code if it is working...

declaration:

table ttipcf100

field.item.f:
before.zoom:

attr.zoomcode = z.session
attr.zoomsession$ = "tipcf1501m000"
attr.zoomreturn = "tipcf100.cpft"
tipcf100.item = item.f

Babu Nagarajan
1st September 2016, 17:24
Hi Manish,

I tried this. It didnt work.

Babu

shah_bs
1st September 2016, 19:38
I am thinking Manish's solution should work.

What happens - do you get a blank screen? In that case, you may not have data in the table at all maybe? (I suppose this would qualify as a 'silly question').

The session tipcf1501m000 is for displaying information about GENERIC items. You may have to somehow 'match' what you are placing in tipcf100.item to what is available in the data of the table tipcf100. What I am saying is that the actual item code is derived from the generic item code by some formula concatenation of extra characters, so you may have to truncate it somehow to match to the 'base' item code which is store in the tipcf100 table. Maybe you have the Generic Item Code stored in your own source table. Need more details about your session to make a good suggestion.

Ajesh
4th September 2016, 20:28
Just try one thing..in before.zoom,just assign the desired value to table field of the main table..

Something like this,(tcibd001 the main table)


Before.zoom:

tcibd001 = item.f

manish_patel
6th September 2016, 07:53
Hi Manish,

I tried this. It didnt work.

Babu

Do below additional things along with my earlier suggestion.

Copy tipcf1501m000 session to your customize VRC and change the start option of the session to 7 - Refresh.

Please let me know if it works or not.

Babu Nagarajan
6th September 2016, 13:26
Hi Manish,

I tried this. It did not work.

Regards
Babu

Babu Nagarajan
6th September 2016, 13:27
Hi Ajesh,

I tried this. It did not work.

Regards
Babu

Ajesh
6th September 2016, 14:05
When i faced this problem, what i did, i built a customized session and ended it.

manish_patel
6th September 2016, 14:26
I believe that automatic import should work.
If possible, could you please share your code?

mark_h
6th September 2016, 14:34
If he is using 4c3 then automatic import does not always work. I ran into this on a couple of 4c4 sessions.

manish_patel
6th September 2016, 15:24
Mark, good to know this... In that case, I would try below things

Copy tipcf1501m000 session to your customized VRC with new name and change the start option of the session to 44 – Get Defaults. (to avoid any conflict in get/save defaults of original session)
In Parent session, before zooming save the defaults for this new session (by updating table ttadv990)