View refresh not working


Jackson, Adam
 

Hi,

 

xPa 2.5 / MSSQL

 

I am having issues to get View Refresh to work.

 

I have a program P with task A (filters) calling task B as sub form (header record) which in turn has task C (line items) as a sub form. When I create a new item in task C I call a program X to ask the user what they want to create. Once data is entered they press a button which runs a batch task and creates the new record and closes X. When I return to task C I do a View Refresh and locate on the line no of the item I have just created (passed from Prog X to task C as a share memory value). This works fine.

 

Prog X is sized / positioned so that you can see P (A, B and C) behind it so the user can see what line items there are.

 

I then modified the call from task C to be Block While Z=True where Z is a virtual “Keep Looping the create call”. This virtual is sent to X as an argument and depending on which button you press in X you either return to C with Z  = True or False. If Z=False it does the view refresh / locate OK pretty much as above and stays at C locating on the last item created. If Z = True then it re-calls X for the user to create another item BUT it does not do the view refresh/locate  so the user cannot see that the item they have just created is there. They’re not sure it is there so they create same again and get duplicate index and it all gets messy. Once you have looped around as many items you want to create and press the button that sets Z=false it goes back to C, refreshes and jumps to the last line just created.

 

I have put in a user event to capture View Refresh and it is either not firing at all or it is firing after X is opening so does the VR there. My user event has a verify in it along the lines of <some text>&prog()&level(0)&level(1). The prog() value is that of Prog X but I cannot find any View Refreshes there.

 

I have even tried query/modify instead of VR and it definitely switches modes but the view does not refresh.

 

I have set the transaction at C to be Physical/none to see if it was transaction not completing until the Block-While was still happening but got same.

 

I have checked in SQL to see if records appear after each iteration of X which they do.

 

I have checked for open locks after each iteration of X – there are none.

 

I did not think what I was trying to achieve was excessively complicated but it seems I have gotten into a muddle.

 

Can anyone help?

 

TIA

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

 

 

McLaren Formula 1 Team

McLaren Technology Centre

Chertsey Road, Woking

Surrey, GU21 4YH, UK

mclaren.com

Facebook

Instagram

LinkedIn

Twitter

YouTube

 

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Adrian Wick
 
Edited

Hi,

1. sub forms usually ask for a parameter. Do you have 1? If you don't have any, add a dummy time variable in program A, send it as parameter to sub form B and C and update this dummy variable every time a record is written to the database.
If only sub form C is giving you problems, than send this parameter to sub form C only ... No need for sub form B.

2. call a sub form refresh event

3. disable "cache" on tasks and tables.

Regards
A


Jackson, Adam
 

Hi,

 

I have two parameters in C – first is the header ID to range the items by – second is one I added for the purpose you mentioned below. It is a variable in task B that I update with the shared memory value in the block while loop (I have a debug verify and the update is happening) but there is no subform refresh going on (I have another debug verify in TP of C). There is only one table in the A-B-C chain with cache turned on which I cannot turn off as it is used as data source for a combo box. Could this be issue? Like you I would expect that if I change a parameter in a subform the subform should refresh.

 

Thanks for help,

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Adrian Wick via groups.io
Sent: 11 January 2023 04:59
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] View refresh not working

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

[Edited Message Follows]

Hi,

1. sub forms usually ask for a parameter. Do you have 1? If you don't have any, add a dummy time variable in program A, send it as parameter to sub form B and C and update this dummy variable every time a record is written to the database.
If only sub form C is giving you problems, than send this parameter to sub form C only ... No need for sub form B.

2. call a sub form refresh event

3. disable "cache" on tasks and tables.

Regards
A

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478


Jackson, Adam
 

I deleted the combo box and the cached table went from Ctrl+D screen. Tried again and still same

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Jackson, Adam via groups.io
Sent: 11 January 2023 08:43
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] View refresh not working

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

Hi,

 

I have two parameters in C – first is the header ID to range the items by – second is one I added for the purpose you mentioned below. It is a variable in task B that I update with the shared memory value in the block while loop (I have a debug verify and the update is happening) but there is no subform refresh going on (I have another debug verify in TP of C). There is only one table in the A-B-C chain with cache turned on which I cannot turn off as it is used as data source for a combo box. Could this be issue? Like you I would expect that if I change a parameter in a subform the subform should refresh.

 

Thanks for help,

 

Adam

 

Adam

Jackson

Senior Manager, Operations and Digital Systems

T  +447949892482

E  adam.jackson@...

McLaren Formula 1 Team

 

 

From: main@magicu-l.groups.io <main@magicu-l.groups.io> On Behalf Of Adrian Wick via groups.io
Sent: 11 January 2023 04:59
To: main@magicu-l.groups.io
Subject: Re: [magicu-l] View refresh not working

 

CAUTION: This email originated from outside of McLaren. Do not click links or open attachments unless you recognise the sender and know the content is safe. Report any suspicious emails using the 'Report Phishing Email' button in Outlook.

 

[Edited Message Follows]

Hi,

1. sub forms usually ask for a parameter. Do you have 1? If you don't have any, add a dummy time variable in program A, send it as parameter to sub form B and C and update this dummy variable every time a record is written to the database.
If only sub form C is giving you problems, than send this parameter to sub form C only ... No need for sub form B.

2. call a sub form refresh event

3. disable "cache" on tasks and tables.

Regards
A

The contents of this e-mail are confidential and for the exclusive use of the intended recipient. If you are not the intended recipient you should not read, copy, retransmit or disclose its contents. If you have received this email in error please delete it from your system immediately and notify us either by email or telephone. The views expressed in this communication may not necessarily be the views held by McLaren Racing Limited.
McLaren Racing Limited, McLaren Technology Centre, Chertsey Road, Woking, Surrey, GU21 4YH, UK. Company Number: 01517478