ian_j_albert
20th July 2010, 09:27
Hi Guys,

I've been testing out Exchange with Export Conditions. I'm having some issues and I'm not sure what is going on. this is with LN 6.1

I am trying to export out stuff from Activities (tdsmi200) table.
I can use the following script

IF
tdsmi200.bpid > "BPG000000"
AND
tdsmi200.bpid < "BPG999999"
THEN
test = true
ELSE
test=false
ENDIF
return(test)

Now this works fine. What I am actually need to do is to pull data of the tdsmi200.cact field which is the activity name. Basically the script below is used. I get no output. I am not able to retrieve data from any fields that is a string type. the activity table has a field that uses UTC (numeric) and I am able to pull out data from here... It seems that strings are giving an odd problem.

IF
tdsmi200.cact = "DEMO"
THEN
test = true
ELSE
test=false
ENDIF
return(test)

Would appreciate any help on this on how to create conditions for string fields.

ian_j_albert
20th July 2010, 09:41
Found out the issue...

the tdsmi200.cact field has a lenght of 8 characters. I had to use "DEMO " which must have a total 8 characters . Now is there any other way to do this because I would find it weird having to always ensure that my condition for strings must always be the entire lenght of the field inclusive of spaces.

bdittmar
20th July 2010, 11:20
Found out the issue...

the tdsmi200.cact field has a lenght of 8 characters. I had to use "DEMO " which must have a total 8 characters . Now is there any other way to do this because I would find it weird having to always ensure that my condition for strings must always be the entire lenght of the field inclusive of spaces.

Hello,

use a string operation like:

IF
strip$(tdsmi200.cact) = "DEMO"
THEN
test = true
ELSE
test=false
ENDIF
return(test)

From LN prog guide :

String operations synopsis
string concat$() ( string separator, expr, ... )
boolean isdigit() ( string_expr )
boolean isspace() ( string_expr )
long len() ( string_expr )
long len.in.bytes() ( string_expr )
long load.byte() ( string record(long spos) )
double load.double() ( string record(long spos) [, long endian] )
double load.float() ( string record(long spos) [, long endian] )
long load.long() ( string record(long spos) [, long endian] )
long load.short() ( string record(long spos) [, long endian] )
long lval ( string_expr )
void not.fixed() ( string string_var(.) )
long pos(), rpos() ( string source(.), string pattern(.) )
long pos(), rpos() ( string source(.), string pattern(.) )
long set.strip.mode ( long table_id, long mode )
long set.symbol.strip.mode ( ref string str, long mode )
string shiftc$(), shiftl$(), shiftr$() ( string strg(.) )
string shiftc$(), shiftl$(), shiftr$() ( string strg(.) )
string shiftc$(), shiftl$(), shiftr$() ( string strg(.) )
void store.byte() ( long lng, ref string rec )
void store.double() ( double dbl, ref string rec )
void store.float() ( double dbl, ref string rec )
void store.long() ( long lng, ref string rec )
void store.short() ( long lng, ref string rec )
string str$() ( num_expr )
string string.set$() ( string_expr, num_expr )
string strip$() ( string strg(.) )
string tolower$(), toupper$() ( string_expr )
string tolower$(), toupper$() ( string_expr )
string trim$() ( string_expr )
string quoted.string() ( string_expr )

long tt.align.according.domain() ( string string_in(.), ref string string_out(), string domain_name )
double val ( string_expr )


Regards

mark_h
20th July 2010, 14:15
I think he meant strip$(tdsmi200.cact) = "DEMO", but did not think I should edit his post.

ian_j_albert
22nd July 2010, 08:30
Thanks for the information Mark.

I'll give this ago.. I got sidetrack from this for a bit.