Log in Register FAQ Memberlist Search ContactReview Forum Index
A GoldMine Discussion and Support Community

ContactReview Forum Index » GoldBox » Translating ref into actcode Goto page 1, 2  Next
Post new topic  Reply to topic View previous topic :: View next topic 
Translating ref into actcode
PostPosted: Mon Feb 25, 2008 2:06 am Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Hello all,

I am going to be importing into the calender table using goldbox. the file will be a dbf so we will not have all the information such as the activity codes.

what expression would i use to say if field a contain intro course then put INT code into the activity code and so on. An example query would help me heaps i know it will be a if then else one but not sure how goldbox wants it written

thanks
Una
View user's profile Send private message

PostPosted: Mon Feb 25, 2008 5:51 am Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




You are implying that the reason you won't have Source fields for some of your Target fields is because you are using a .dbf file. That's not true at all. Just want to correct that.

You'll need to provide more specific information if you want help with the expression. I will say that GoldBox uses standard dBase expressions. For example,

Code:
IIF(Source->Ref="So and so", "ABC", "XYZ")

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Feb 25, 2008 4:00 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Bob,

I have a habit of writing things that make sense to me only Shocked

I meant to say my source file will not have all the data I need to populate an appointment such as activity codes etc.

So if I wanted to say, If field1 contains Intro, then put INT into the activity code, if Field1 contains Advanced then put ADV into the activity code for the Appointment etc.

My sql queries aren't too hectic and am more used of QUotewerks and goldmine, i hop in and out of goldbox use now and then its a great product though i must say for what they charge

Una
View user's profile Send private message

PostPosted: Mon Feb 25, 2008 4:11 pm Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




Think of an IIF statement in much the same way as Lookup.ini; that is, you have one or more sets of "if X, then Y"; and at the end, you have an "Otherwise" statement.

Quote:
So if I wanted to say, If field1 contains Intro, then put INT into the activity code, if Field1 contains Advanced then put ADV into the activity code for the Appointment etc.


This seems to be:

Code:
IIF("Intro" $ Source->Field1, "INT", "ADV")


If you have more than two possible values for Field1, you will end up nesting IIF statements. If you don't know how to do that, you'll have to come back and post again, with more info. You really need to try to give all the information that may be needed in the first post. That "etc." at the end of your paragraph above is worse than useless.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

One last request
PostPosted: Tue Apr 15, 2008 8:35 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Bob,

One last request on this one, It has been a while since I visited this and I know you will have some information on this for me please.

I know I asked you this one before but here goes again with some more detail

if field5 contains introduction then put in activity code INT into a scheduled calender activity,

if field5 contains intermediate then put in INE into the activity code
If field5 contains Advanced, then put ADV into the activity code of a calender activity.

I know how to do it in a lookup.ini but my nesting and IIf statements arent the best.

Thanks a million, you are a life saver Smile

Una
View user's profile Send private message

PostPosted: Tue Apr 15, 2008 9:00 pm Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




Code:
IIF("introduction" $ Source->Field5, "INT", IIF("intermediate" $ Source->Field5, "INE", IIF("advanced" $ Source->Field5, "ADV", "Anything else")))


You didn't state that Field5 was limited to the three values you named, so I put in something for the possibility of something other than them.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Apr 15, 2008 9:22 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Bob,

Your a lifesaver, much appreciated Smile

Una
View user's profile Send private message

PostPosted: Tue Apr 15, 2008 9:40 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Bob,

One more question and I will be gone well its two I promise

1) In regards to the activity code, I want to say if Introduction is the first word, then put this code in so If you can give me the syntax like

If firstword in this field is Introduction then make the activity code INT as I forgot to say this field is like this Introduction - Intro course in GoldMine for expample. It will always have introduction, intermediate or advanced in the field as the firstword.

2) i did ask this one before I figured it out and now I cant remember it Sad
I have two fields that i want to populate the reference with

field1 = Description
field2 l location

Field two contains the city and the address, the city is alwways followed by a -

so i would like it to read city and add on the description

Field1 = Introduction course to goldmine
field 2 = Brisbane - 2 Coronation drive

I would like it to read Brisbane Introduction course to GoldMine

Much appreciated and thanks again
Una
View user's profile Send private message

PostPosted: Tue Apr 15, 2008 10:21 pm Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




Una, there have been long stretches of time that I just wouldn't read your posts, because of things like this. You don't get the answer you want the first time because you don't ask the question you should the first time. And that's because you are just too careless when you are writing your posts. When you are careless, the people who try to help you have to do 2 or 3 times the work or more. That's inconsiderate of you.

In the second of your questions here, you are speaking so generally that I have no real context for my answer. You should give specific fieldnames and tablenames; don't expect us to read your mind. I kinda think I have an idea of what you want, but I should never have to guess about that.

Keep this in mind: when we help you, we have to write computer code that is EXACTLY PERFECT or it won't work at all. That takes some time and some precision effort. You should be willing to invest at least as much time, and effort that attempts as much precision, yourself.

I'm going to bed now; maybe I'll be in the mood to deal with this in the morning.

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Tue Apr 15, 2008 11:06 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Apologies on my posts.

Thanks for all your help. I will try and be more exact/ precise in my future postings. Thanks again.

Una
View user's profile Send private message

PostPosted: Wed Apr 16, 2008 5:28 am Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




Please do try harder, or I'll have to stop answering.

1)

IIF(Upper(FirstWord(Source->Field5)) = "INTRODUCTION", "INT", IIF(Upper(FirstWord(Source->Field5)) = "INTERMEDIATE", "INE", IIF(Upper(FirstWord(Source->Field5)) = "ADVANCED", "ADV")))

2) Assuming that the hyphen is separated from the City by a space, as you show it. Major difference if it isn't.

FirstWord(Source->Field2) + " " + Source->Field1

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Apr 16, 2008 3:50 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Bob,

Your last post should close off my issue. many thanks, if it wasn't for people like yourself, I would have nobody to help me.

Thanks again
Have a nice day
Una Very Happy Very Happy Very Happy Very Happy Very Happy
View user's profile Send private message

PostPosted: Mon Apr 21, 2008 5:48 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Bob,

I hope this finds you well. I am afraid my last query in regards to the position of data in a field was incorrect. Thank you for replying with the function FIRSTWORD.

My field contains the following

Fielddata = abcderdgg asdff - ddsfjslfj fjsjslfj - eretetet

I would like to extract everything left of the first dash, which can be one or two words.
I know you use the AT function for this, but it doesn't seem to be working for me. I wonder is it the second dash that is causing the problem

The result I would like to see is everything left of the first dash sign.

abcderdgg asdff

I hope this is clear enough and I really do appreciate all the time you have taken on this problem for me. You are a godsend Smile

Thanks
Una
View user's profile Send private message

PostPosted: Mon Apr 21, 2008 6:06 pm Points: 0 Reply with quote
BobTaylor
GoldBox Guru
Joined: 07 Sep 2007
Posts: 1216
Location: Jacksonville, FL




Code:
SubStr("abcderdgg asdff - ddsfjslfj fjsjslfj - eretetet", 1, At("-", "abcderdgg asdff - ddsfjslfj fjsjslfj - eretetet")-1)

_________________
Bob Taylor
Bob Taylor Consulting
(904)646-9861
www.goldboxbob.com
Consulting with GoldBox and GoldMine since 1997.
View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Mon Apr 21, 2008 7:04 pm Points: 0 Reply with quote
unaclancy
GoldMine Journeyman
Joined: 29 Oct 2007
Posts: 32




Thanks Bob for that

Here is my field that holds the information and the query I am using and the result

Field that holds the information in my dbf file = Txconvdb->Fld0006

The query I would use

SubStr("Txconvdb->Fld0006", 1, At("-", "Txconvdb->Fld0006")-1)

the result I get for every record is

Txconvdb

so it seems to be reading the fieldname and trimming it as opposed to looking in that field for the data and trimming the data.

i am on the latest version of goldbox version 2008 -G
I am importing into the reference field of an appointment.

Thank you Bob
Embarassed
Una
View user's profile Send private message

Translating ref into actcode
  ContactReview Forum Index » GoldBox
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 7 Hours  
Page 1 of 2  
Goto page 1, 2  Next
  
  
 Post new topic  Reply to topic  


Brought to you by Castell Computers, Doug Castell, Admin
RSS Feed
Powered by phpBB © 2001-2004 phpBB Group
Theme created by Vjacheslav Trushkin