Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: Brad BrezinskiHello, I have a string field that contains a text descriptions. I want to split the sting using spaces into an array and delete all the words that aren't exactly 11 characters in length. I'm using a while statement to loop through the items in the array. But, it's not updating the array element using what I have below. How can I get it to update the array element to "" if the elements in a length other than 11?
aRMKString = split('vRMKString', " ")
vLen = aRMKString.len()
j = 0
while j < vLen {
if aRMKString[j].len() < 11 then
aRMKString[j] == ""
j = j + 1
}
emit aRMKString[5] as ArrayItem5, aRMKString[5].Len() as ItemLen, *
node:Filter_16
bretype:core::Filter
editor:sortkey=582e1689653363d1_3
input:@40fd2c74167f1ca2/=Static_Data_5.40fe6c55598828e5
output:@40fd2c7420761db6/=
prop:Script=<<EOX
aRMKString = split('vRMKString', " ")
vLen = aRMKString.len()
j = 0
while j < vLen {
if aRMKString[j].len() < 11 then
aRMKString[j] == ""
j = j + 1
}
emit aRMKString[5] as ArrayItem5, aRMKString[5].Len() as ItemLen, *
EOX
editor:XY=510,320
editor:Notes=MyList = list("A","B","C","D")
editor:Notes=i = 0
editor:Notes=result = false
editor:Notes=
editor:Notes=while i < MyList.len() and result == false {
editor:Notes= if MyList[i] == 'TestField' then
editor:Notes= result = true
editor:Notes= i = i + 1
editor:Notes=}
editor:Notes=
editor:Notes=emit TestField, result as Result
end:Filter_16
node:Static_Data_5
bretype:core::Static Data
editor:sortkey=5cd5d6803d8a6825
output:@40fe6c55598828e5/=
prop:StaticData=<<EOX
vRMKString:string
one two there four five six seven eight nine ten elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
one two there four five six seven eight nine ten elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn elevennnnnn twelve thirteen fourteen fifteen
EOX
editor:XY=410,320
end:Static_Data_5