Array Expression or Method in Fillusing

Public support forum for peer to peer support with related to the Visual Objects and Vulcan.NET products
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Array Expression or Method in Fillusing

Post by lumberjack »

Jeff,
BiggyRat wrote:LOL because of your code! :)
Nope not my code, check you original posting, it was DataWindow... :cheer:
______________________
Johan Nel
Boshof, South Africa
BiggyRat

Array Expression or Method in Fillusing

Post by BiggyRat »

D'Oh! Sorry, my bad. Thank you Johan, you put me on the right track. I thought it had something to do with the order of things somewhere. I foolishly thought VO would create the init file with things in the correct order.. I moved that section of code to immediately after when the server is attached, and it worked.... MOSTLY.

Now, all I have to do is work out how to rebuild the array when the record changes...
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Array Expression or Method in Fillusing

Post by lumberjack »

Jeff,
BiggyRat wrote: Now, all I have to do is work out how to rebuild the array when the record changes...
How is the record number changing? Behind a Skip button(s)?
______________________
Johan Nel
Boshof, South Africa
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Array Expression or Method in Fillusing

Post by Karl-Heinz »

BiggyRat wrote: Now, all I have to do is work out how to rebuild the array when the record changes...
Hi Jeff,

you can do that in the Window Notify() method.

Code: Select all

METHOD Notify( kNotifyName , uDescription ) CLASS yourwin
LOCAL xRet AS USUAL

	xRet := SUPER:Notify( kNotifyName , uDescription )	
	
	IF kNotifyName >= NotifyRecordChange .AND. kNotifyName <= NotifyGoTop

          self:FillComboBox()


	ENDIF

	
	RETURN xRet


Method FillComboBox() class yourwin	

oYourCmb:fillusing ( {{self:Server:FIELDGET(#CLCONTACT), self:Server:FIELDGET(#CLCONTACT)}, ;
               {self:Server:FIELDGET(#SCONTACT), self:Server:FIELDGET(#SCONTACT)}, ;
               {self:Server:FIELDGET(#REPCONTACT), self:Server:FIELDGET(#REPCONTACT)}} )

oYourCmb:currentitemno := 1

return self

But honestly, i don´t understand what you are trying to achieve, when you fill each time the record pointer is moved a comboxbox with self:server content ? What happens if the user selects a combobox item ?

regards
Karl-Heinz
BiggyRat

Array Expression or Method in Fillusing

Post by BiggyRat »

"How is the record number changing? Behind a Skip button(s)?" Exactly Johan. I have sorted it out though thank you very much again for your help.

"But honestly, i don´t understand what you are trying to achieve, when you fill each time the record pointer is moved a comboxbox with self:server content ? What happens if the user selects a combobox item ?"

As I said in my initial post Karl-Heinz, each Company record has up to 3 contacts, each with their own email address and phone number. On my window I have 2 fixed texts - EmailTxt and PhoneTxt Based on the selected item in the ComboBox, I assign the appropriate email and phone details as captions to those fixed texts. That way the user can select which contact they want for that company, without having to switch screens...

This should show you EXACTLY what's going on:

https://cl.ly/30d9b94cd2d5
Karl-Heinz
Posts: 774
Joined: Wed May 17, 2017 8:50 am
Location: Germany

Array Expression or Method in Fillusing

Post by Karl-Heinz »

ok, i got it :-)

regards
Karl-Heinz
User avatar
lumberjack
Posts: 727
Joined: Fri Sep 25, 2015 3:11 pm
Location: South Africa

Array Expression or Method in Fillusing

Post by lumberjack »

BiggyRat wrote:"How is the record number changing? Behind a Skip button(s)?" Exactly Johan. I have sorted it out though thank you very much again for your help.
Glad we could be of help.
As I said in my initial post Karl-Heinz, each Company record has up to 3 contacts, each with their own email address and phone number. On my window I have 2 fixed texts - EmailTxt and PhoneTxt Based on the selected item in the ComboBox, I assign the appropriate email and phone details as captions to those fixed texts. That way the user can select which contact they want for that company, without having to switch screens...
This should show you EXACTLY what's going on:
Thanks for sharing, I do understand what you want to achieve, was just a bit of effort to get behind the code logic. Well done and good luck with the rest... We waiting in anticipation for the next challenge :P
______________________
Johan Nel
Boshof, South Africa
Post Reply