Basically if l1 is greater than the str_len then i need to take a part of the string and set str_len to 0. (Repeating this for several other fields) If it is less than str_len I want to take all the string and set str_len to str_len - l1. At the moment this is multiple IF statements. How do I make this work more simply I cant even get the IF statement to execute muultiple line commands
If (l1 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes1},str_len);
If (l1 >= str_len and str_len >=0) Then
str_len := 0;
If l1 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes1};
If l1 < str_len and str_len >=0 Then
str_len := str_len - l1;
If (l2 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes2},str_len);
If (l2 >= str_len and str_len >=0) Then
str_len := 0;
If l2 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes2};
If l2 < str_len and str_len >=0 Then
str_len := str_len - l2;
If (l3 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes3},str_len);
If (l3 >= str_len and str_len >=0) Then
str_len := 0;
If l3 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes3};
If l3 < str_len and str_len >=0 Then
str_len := str_len - l3;
If (l1 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes1},str_len);
If (l1 >= str_len and str_len >=0) Then
str_len := 0;
If l1 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes1};
If l1 < str_len and str_len >=0 Then
str_len := str_len - l1;
If (l2 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes2},str_len);
If (l2 >= str_len and str_len >=0) Then
str_len := 0;
If l2 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes2};
If l2 < str_len and str_len >=0 Then
str_len := str_len - l2;
If (l3 >= str_len and str_len >=0) Then
String_OUT := String_OUT + LEFT({t1.Notes3},str_len);
If (l3 >= str_len and str_len >=0) Then
str_len := 0;
If l3 < str_len and str_len >=0 Then
String_OUT := String_OUT + {t1.Notes3};
If l3 < str_len and str_len >=0 Then
str_len := str_len - l3;