Re: v13 - Why would a query fail to change current reocrd?

2018-10-16 Thread Chip Scheide via 4D_Tech
Pat,
Thanks!

this occurred to me last night, after I had gone home - of course  :)

And the answer is --YES-- there was/is a set query destination command.
I have it wrapped as part of a component for set management (Setutl).  
It was silently failing :(

Chip
On Tue, 16 Oct 2018 10:04:25 +0100, Pat Bensky via 4D_Tech wrote:
> Chip,
> You haven't got a SET QUERY DESTINATION somewhere have you?
> Pat
> 
> On Mon, 15 Oct 2018 at 23:24, Chip Scheide via 4D_Tech 
> <4d_tech@lists.4d.com>
> wrote:
> 
>> Background
>> - I use 2 tables to manage listboxes.
>> - I am on an entry form, which includes a selection listbox.
>> - I am trying to display, in a dialog (Mac so a type 34 sheet window),
>> a different listbox (array) to allow the user to make a selection.
>> 
>> before the below code executes, the current selection of
>> [listbox_table] reflects the definition for selection listbox
>> displaying on the current entry form (ID 1327).
>> 
>> I make this call : arylstbx_Setup ("lb_Display_Choices";"Choose_Item")
>> In the above call there are these lines of code:
>>   //gets base info for listbox description
>> QUERY([List_Box_Table];[List_Box_Table]Listbox_Name=$Listbox_Name;*)
>> QUERY([List_Box_Table]; & ;[List_Box_Table]Primary_Use=$Primary_Use)
>> 
>> $Listbox_Name = $1 = lb_Display_Choices
>> Primary_Use = $2 = Choose_Item
>> 
>> Results:
>> - after the Query, the current record has not changed!
>> - If I issue an Unload record (in debugger) before the query, no record
>> is loaded
>> - in 'user' environment' the same query locates, and loads a different
>> record (ID 1505).
>> 
>> State:
>> in transaction [Listbox_Table] is read only & Locked
>> all actions are occurring inside the same transaction.
>> 
>> My thoughts and attempts to resolve:
>> - entry form listbox was doing some sort of background query on
>> [listbox_table] during on display detail, so I set the listbox
>> invisible before opening the type 34 dialog window. -- no effect.
>> - I have put traces in the code for the listbox and the form  to see if
>> something is running and changing the selection of the [listbox_table]
>> table - noting is running.
>> - all of the code for the dialog is 'linear' to the entry form, i.e.
>> the dialog is opened inside the same process and same transaction so -
>> conceptually - no other code should be running to change the selection
>> in the [listbox_table]
>> - relations - only one relation, completely manual.
>> 
>> and ideas?
>> sorry for wall of text
>> 
>> Chip
>> ---
>> Gas is for washing parts
>> Alcohol is for drinkin'
>> Nitromethane is for racing
>> **
>> 4D Internet Users Group (4D iNUG)
>> Archive:  http://lists.4d.com/archives.html
>> Options: https://lists.4d.com/mailman/options/4d_tech
>> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
>> **
> 
> 
> 
> -- 
> *
> CatBase - Top Dog in Data Publishing
> tel: +44 (0) 207 118 7889
> w: http://www.catbase.com
> skype: pat.bensky
> *
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **
---
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing 
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**

Re: v13 - Why would a query fail to change current reocrd?

2018-10-16 Thread Pat Bensky via 4D_Tech
Chip,
You haven't got a SET QUERY DESTINATION somewhere have you?
Pat

On Mon, 15 Oct 2018 at 23:24, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com>
wrote:

> Background
> - I use 2 tables to manage listboxes.
> - I am on an entry form, which includes a selection listbox.
> - I am trying to display, in a dialog (Mac so a type 34 sheet window),
> a different listbox (array) to allow the user to make a selection.
>
> before the below code executes, the current selection of
> [listbox_table] reflects the definition for selection listbox
> displaying on the current entry form (ID 1327).
>
> I make this call : arylstbx_Setup ("lb_Display_Choices";"Choose_Item")
> In the above call there are these lines of code:
>   //gets base info for listbox description
> QUERY([List_Box_Table];[List_Box_Table]Listbox_Name=$Listbox_Name;*)
> QUERY([List_Box_Table]; & ;[List_Box_Table]Primary_Use=$Primary_Use)
>
> $Listbox_Name = $1 = lb_Display_Choices
> Primary_Use = $2 = Choose_Item
>
> Results:
> - after the Query, the current record has not changed!
> - If I issue an Unload record (in debugger) before the query, no record
> is loaded
> - in 'user' environment' the same query locates, and loads a different
> record (ID 1505).
>
> State:
> in transaction [Listbox_Table] is read only & Locked
> all actions are occurring inside the same transaction.
>
> My thoughts and attempts to resolve:
> - entry form listbox was doing some sort of background query on
> [listbox_table] during on display detail, so I set the listbox
> invisible before opening the type 34 dialog window. -- no effect.
> - I have put traces in the code for the listbox and the form  to see if
> something is running and changing the selection of the [listbox_table]
> table - noting is running.
> - all of the code for the dialog is 'linear' to the entry form, i.e.
> the dialog is opened inside the same process and same transaction so -
> conceptually - no other code should be running to change the selection
> in the [listbox_table]
> - relations - only one relation, completely manual.
>
> and ideas?
> sorry for wall of text
>
> Chip
> ---
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **



-- 
*
CatBase - Top Dog in Data Publishing
tel: +44 (0) 207 118 7889
w: http://www.catbase.com
skype: pat.bensky
*
**
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**