NetTalk Central

Author Topic: Using Auto-Complete instead of Lookup does not refreshs other fields  (Read 4558 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Hi,
I have a lookup field the refreshes some tabs to be hided or unhided.
It works ok
If I disable the lookup and replace it for the autocomplete it does not refresh anymore
If I now add the lookup with the autocomplete it refreshes again.
Regards
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Auto-Complete instead of Lookup does not refreshs other fields
« Reply #1 on: July 04, 2017, 10:00:44 PM »
Can you edit a shipping example to demonstrate the effect?
If you can then I can try and duplicate it here.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Using Auto-Complete instead of Lookup does not refreshs other fields
« Reply #2 on: July 06, 2017, 06:56:25 AM »
Bruce, Ive edited the shipping web3 example for you
Added a tab to the Alias form which is hided depending on the size limit of the mailbox selected.
If you choose the Bounce Maibox which is size=1, the tab appears and if you choose bruce it does not
If you do this with the lookup button it works
If you do this with autocomplete it does not.
Example atached
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Auto-Complete instead of Lookup does not refreshs other fields
« Reply #3 on: July 09, 2017, 10:10:12 PM »


Your tab condition is
p_web.gsv('MAI:SizeLimit')=1

however doing a lookup on the record (by typing the code, or doing an auto-complete) does not move that record into the session queue. (the browse-as-lookup procedure does, but by accident, not design.)

In other words, if you want to load the record of the related file into the session queue then you will need to add the embed code to do that.
In the ALI:MailBoxNumber routine, "After Validate New Value" embed

  Access:MailBoxes.Open()
  Access:MailBoxes.UseFile()
  MAI:MailBoxNumber = ALI:MailBoxNumber
  Access:MailBoxes.Fetch(MAI:PrimaryKey)
  p_web.FileToSessionQueue(MailBoxes)
  Access:MailBoxes.Close()


Cheers
Bruce
« Last Edit: July 09, 2017, 10:15:37 PM by Bruce »

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Using Auto-Complete instead of Lookup does not refreshs other fields
« Reply #4 on: July 20, 2017, 07:30:49 AM »
It does not work Bruce

Theres not a  "After Validate New Value" routine
Ive found "AfterValidate" I dont know if its the same
But it does not work

FWIW
1-  I you set the lookup to be POPUP it does not work either
2-  Ive seen routines where you refresh the fields but do not refreshes the tabs

Regards
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Using Auto-Complete instead of Lookup does not refreshs other fields
« Reply #5 on: July 20, 2017, 09:54:00 PM »
see attached picture - this was what I added to the example you sent me.

cheers
Bruce