Nope not my code, check you original posting, it was DataWindow... :cheer:BiggyRat wrote:LOL because of your code!
Array Expression or Method in Fillusing
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Array Expression or Method in Fillusing
Jeff,
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
Array Expression or Method in Fillusing
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...
Now, all I have to do is work out how to rebuild the array when the record changes...
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Array Expression or Method in Fillusing
Jeff,
How is the record number changing? Behind a Skip button(s)?BiggyRat wrote: Now, all I have to do is work out how to rebuild the array when the record changes...
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Array Expression or Method in Fillusing
Hi Jeff,BiggyRat wrote: Now, all I have to do is work out how to rebuild the array when the record changes...
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
regards
Karl-Heinz
Array Expression or Method in Fillusing
"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
"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
-
- Posts: 774
- Joined: Wed May 17, 2017 8:50 am
- Location: Germany
Array Expression or Method in Fillusing
ok, i got it
regards
Karl-Heinz
regards
Karl-Heinz
- lumberjack
- Posts: 727
- Joined: Fri Sep 25, 2015 3:11 pm
- Location: South Africa
Array Expression or Method in Fillusing
Glad we could be of help.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.
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 challengeAs 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:
______________________
Johan Nel
Boshof, South Africa
Johan Nel
Boshof, South Africa