Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 13th March 2017, 16:30
JustaPackfan JustaPackfan is offline
Junior Member
 
Join Date: Nov 2002
Location: Washington
Posts: 8
JustaPackfan is on a distinguished road
Baan: Baan V (Corelli) - DB: Oracle 9 - OS: UNIX HPUX11.00
Unable to refer to a #define symbol via a variable
Baan: ERP LN 6.1 FP9 (Infor ERP 10.3)
C/S: Both

oh gosh, I did not put enough clarity into this.
My tccom999.srch value could be something like "yahoo".
The overall idea is that we don't really know what the associated value in the
#define will be. That would end up being defined in a #include <file> at some
point. So I can't really assume the value will contain "yahoo", or "google", etc.
I would then just want to read my table field's value, from tccom999.srch,
and then I was hoping I could use that value, such as "yahoo" to then
be associated with a "#define" token, such as "#define yahoo "https://www.yahoo.com/".

But having trouble figuring out how I can use a table string field to store a value,
and then use that value in 3GL code such that it can refer to a token in a #define statement.
Example:
if I have table field tccom999.srch = "yahoo"
and the following code:

#define yahoo "https://www.yahoo.com/"
#define google "https://www.google.com/"
#define mycompany "https://www.search.local.engine.net/"
#define bing "https://www.bing.com/"

string search.url(80)

select tccom999.srch
from tccom999
selectdo
search.url = tccom999.srch
endselect

| This only sets search.url to "yahoo".
| An idea on how I could get the search.url to equal "https://www.yahoo.com/" ?
| I had no luck with get.var, no luck with expr.compile
| Of then if later the value of tccom999.srch was changed to "mycompany",
| then the value of search.url should change to "https://www.search.local.engine.net/".
| But I am just having no luck in getting this to happen.
thanks
__________________
Packfan

Last edited by JustaPackfan : 13th March 2017 at 22:19.
Reply With Quote
  #2  
Old 13th March 2017, 17:30
rahul ingale rahul ingale is offline
Member
 
Join Date: May 2011
Location: Hyderabad
Posts: 33
rahul ingale is on a distinguished road
Baan: baan infor - DB: sql - OS: windows xp
#define expand.url "https://www." & tccom999.sech & "/"


string search.url(80)

select tccom999.srch
from tccom999
selectdo
search.url = expand.url
endselect

Just concat the the strings in normal way
__________________
IRL
Reply With Quote
  #3  
Old 13th March 2017, 22:30
JustaPackfan JustaPackfan is offline
Junior Member
 
Join Date: Nov 2002
Location: Washington
Posts: 8
JustaPackfan is on a distinguished road
Baan: Baan V (Corelli) - DB: Oracle 9 - OS: UNIX HPUX11.00
the value is not always one-for-one lined up with keyword

thanks Rahul, I updated my post a bit.
For that subsequent value associated with the #define token/symbol, it would not always be as straightforward as substituting a keywork like "yahoo" or "google", or "bing", etc.

So if a developer defined a value to be something like "http://www.baanboard.com/search/site" and then associated that to a token named baan, such as
#define baan "http://www.baanboard.com/search/site"
then I'd like to somehow get the value "baan" from tccom999.srch and be able to then have a means to see that "baan" actually defined that value, "http://www.baanboard.com/search/site".
But all I try fails, and I only ever end up seeing "baan" as my value.
Such as
string temp(200)
temp = tccom999.srch | this just sets temp to "baan"
get.var(pid, tccom999.srch, temp) | this too sets temp to "baan"
get.var(pid, "tccom999.srch", temp) |as does this also"
__________________
Packfan
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
to trace variable priyanka pawar Tools Development 1 15th April 2012 11:02
debugging code smusba Tools Development 4 16th June 2008 15:10
Has any one used at.base() ? BaaNovva Tools Development 5 26th February 2008 14:14
How to refer a program variable in Baan sql "like" statement Lijie_tu Tools Development 1 24th November 2003 23:17


All times are GMT +2. The time now is 19:12.


©2001-2017 - Baanboard.com - Baanforums.com