chavez
21st November 2013, 13:48
Hi all,
I'm trying to make an overview session that allows the insertion of records when called from another session.
The session works fine if it is called from the menu but when it's called from another session using start.session it behaves like this:
- MODAL mode - when add.set is invoked it starts another instance of the session
- MODELESS mode - when add.set is invoked a new row is inserted but index fields are locked
Does anyone know how can i use MODELESS mode and enable index fields for insertion.
Thanks
bhushanchanda
21st November 2013, 16:37
Hi,
How are you using the start.session()? Does the zoom field zoom's to that session or is it coded separately? Post your code and also check in the DFE properties, which check boxes are checked. I am assuming you are on LN.
chavez
21st November 2013, 17:19
Hello Bhushan,
Thank you for your reply.
Yes, I'am on LN 10.3.
The calling code is just this:
start.session(MODELESS, "gcltc1101m500", "", "")
I took some screenshots of the session called directly from the menu and using start.session.
Thanks
Regards
Chavez
bhushanchanda
21st November 2013, 17:26
Hi,
Try to make the called session as update session I guess its currently a maintain session. Also, check in the Dynamic Form Editor, what are the form properties. And, try changing the start.session a bit, something like
start.session(MODELESS, "gcltc1101m500", "calling_session", "index_field_of_called_table")
chavez
21st November 2013, 18:32
Hi Bhushan,
Tried all the combinations (session, script-maintain, update) without sucess.
Also passed all the start.session parameters without sucess.
Even using zoom.to$, activate, wait.and.activate doesn't work.
Checked the DFE session and field properties and everything looks ok.
The session works perfectly if it's called from the menu.
Is there a way to call it like this?
Thanks
Chavez
bhushanchanda
21st November 2013, 18:37
Hi,
Can you post the snapshot of the calling session? From where are you calling the session? Is it a zoom field? Or a form command? I would like to test it at my end too.
chavez
22nd November 2013, 00:27
Hi Bhushan,
Thank you for your help.
The session is very simple and and calls the other one using a form command (choice option).
Here are some screenshots.
Thanks
Chavez
bhushanchanda
22nd November 2013, 07:15
Hi,
I have tested it. And it works fine at my end. Do you have any view fields for the session which are part of index field?
You can also try coding,
enable.fields("field_name1","field_name2"...)
What kind of session is gcltc1101m500? What is its window type?
chavez
22nd November 2013, 14:13
Hi Bhushan,
The problem it's the index because the locked fields are part of it.
enable.fields doesn't work.
The session gcltc1101m500 is a maintain session and is a dialog type window.
Thanks
Chavez
chavez
22nd November 2013, 14:50
Hi again,
I've created another index with just one field different from the locked ones(allowing duplicates).
Added the field to the session form and checked it as the only session index.
Strangely the other fields remain locked.
The other fields are the index1 of the table.
Thanks
Chavez
bhushanchanda
22nd November 2013, 16:08
Hi,
May be the form design is doing something for the session gcltc1101m500. Try removing the view fields on the form. Also, set the sequence of the fields as they appear in the index.
chavez
22nd November 2013, 18:30
Hi Bhushan,
Same behavior without the view fields.
Same behavior with the fields in the index order.
Thanks
Chavez
bhushanchanda
22nd November 2013, 19:19
Hi,
I am not sure why its working like that at your end. Well a few testings you can do is,
1. Duplicate the current table for session gcltc1101m500 and change the index1 to say only 1 field.
2. Try creating a new session which will replace gcltc1101m500.
3. Check in debugger, is there any code written in session gcltc1101m500 which is disabling the field.
4. Try adding these lines to the session gcltc1101m500.
group.1:
init.group:
get.screen.defaults()
chavez
24th November 2013, 20:23
Hi Bhushan,
I found out what was going on.
The problem is related to a filter (query.extend) in the zoomed session.
The filter blocks the index1 fields if the session is called from another but doesn't block if it's called from the menu.
Tryed to avoid this using the read.view section in main.table.io but the problem is the same.
To solve it I just put it all in one session.
Thank you very much.
Regards
Chavez
bhushanchanda
24th November 2013, 20:43
The problem is related to a filter (query.extend) in the zoomed session.
The filter blocks the index1 fields if the session is called from another but doesn't block if it's called from the menu.
Ahh, thats the reason why I asked you to check if something was stopping it. Always check under debug mode to get rid of such problems.
Glad it worked for you. :)