NetTalk Central

Author Topic: Still having problems with conditional field  (Read 1993 times)

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Still having problems with conditional field
« on: January 09, 2012, 03:47:17 PM »
I have the conditional field working when there are 2 browses on a window but now want to do the same for a select popup window.

See aattached file. The Update History window was called from the Browse Patient window originally.

So I want to click on the lookup button which calls the Browse Item form. Now I want to hide the NetPrice column on Browse Item.

When I check, loc:parent has not been set, presumably because this is coming from an update form? The fact that this is a lookup could be significant the giveaway being that it is not actually a browse form as indicated by the header LF Shoe.

How can I get this to work please?

Thanks

John



[attachment deleted by admin]

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11181
    • View Profile
Re: Still having problems with conditional field
« Reply #1 on: January 09, 2012, 11:39:08 PM »
>> When I check, loc:parent has not been set, presumably because this is coming from an update form?

no, loc:parent is not set because in this case the lookup browse _control_ is not inside, or linked to, another control. In your earlier example you had one browse (patient) set as the "child" of another browse (contact). the Contact was the "parent" of Patient, which was the child. On the update form the BrowsePatient control was literally _on_ the UpdateContact form, and hence was a child of the form.

The lookup is thus not "related" to the thing that called it. It is (conceptually) on a different window, in this case by itself.

However, all is not lost. I think what you really want is to
"hide the price column when the browse is in lookup mode."

Fortunately there is a variable, loc:selecting, which is set to true while the browse is being generated, if the browse is in lookup mode. So set the column condition to

loc:selecting = 0

John Fligg

  • Sr. Member
  • ****
  • Posts: 361
    • View Profile
    • Ambrit Software
    • Email
Re: Still having problems with conditional field
« Reply #2 on: January 10, 2012, 01:18:28 AM »
Hi Bruce - thank you.

Actually after sending the post I tried for a couple of hours literally to get this going. I tried DebugView with trace, globals etc. I came to the conclusion that loc:parent would not be set for the very same reasons more or less.

I had also been looking in the book at the local variables for NetWebBrowse and Form but did not find the loc:selected one. Now I look at the code I see it although it is not documented.

Anyway Bruce that is exactly what I need and it works absolutely great. Hopefully this helps someone else.

Many thanks..

John