ltannous
6th April 2004, 17:27
I am trying to open a web page using a selection field(reln.f). I am using the concat option to join this selection field to the web path, put it is not recognizing my concat option, but is opening the web page to the main index.
This is what I have, not sure why it is not working. Any help would be appreciated. Thanks
choice.cont.process:
on.choice:
file_patha = "IEXPLORE.EXE http://production/edirpt/html/"
link =toupper$(reln.f)
file_pathb = concat$(".html",link)
file_pathc = concat$(file_pathb,file_patha)
start.client.program(file_pathc, "C:\Program Files\Internet Explorer")
lbencic
6th April 2004, 18:31
The concat$ function is more for creating strings with a given separator. The first argument for concat$ is the separator character. For instance, a line of field values that you want comma separated.
I think you just want to use simple version - the '&' symbol. This just flat out combines strings:
file_patha = "IEXPLORE.EXE http://production/edirpt/html/"
link =toupper$(reln.f)
|* file_pathb = concat$(".html",link)
file_pathb = link & ".html"
|* file_pathc = concat$(file_pathb,file_patha)
file_pathc = file_patha & file_pathb
To check if it's going well, trace the values of your file_ variables in debugger after each statement, you can see the results.
** Edited: Not sure what happend to that url link - it is just supposed to be what you wrote. Only changes are what I commented out & rewrote below.
NPRao
6th April 2004, 19:59
Check your porting set based on your BaaN version.
Here is the info from the release notes of 7.3.a04 porting set.
MaintReger: # 18296 (BDUX11666): bshell: 3GL concat function fix
Date: Tue, 13 May 2003 08:58:39 +0200
Created on: MaintReger
Type: bugfix
Problem Description (Technical terms)
3GL concat$() function calculated the result size wrong and because of this no more string operations were available.
(It gived one value more then it should be.)
function main()
{
string r(18)
r = concat$(".", "ttppp909", "xxxx") & "notattached" & str$(123)
}
The result for the r variable were : ttppp909.xxxx123
str$() function fixed the length, but too late because the "notattached" part lost.
Test Procedure
See problem description.
Motive source
TCS:106-136642
ltannous
6th April 2004, 21:48
I used the & symbol and it worked except for the & ".html"
This opens IE with the following
http://10.21.10.4/edirpt/html/M1000001699%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.html
Not sure what the 20% is.
lbencic
6th April 2004, 21:59
Is that the value of file_pathb if you check in debug when it is assigned? I find that the easiest way to debug these. It's maybe spaces. Can you make sure the variable 'link' is not declared as fixed, then maybe try
|* file_pathb = link & ".html"
file_pathb = strip$(link) & ".html"
If not, let us know the values you see in debug for your program variables after each assign.
ltannous
6th April 2004, 22:36
That worked.
Thanks again