As in string

2 posts / 0 new
Last post
mingche1984
Offline
Joined: 07/25/2023 - 09:22
As in string

Hi all. I am struggling with ideascript. I am trying to exclude certain default postcodes and when I have them within quotes it automatically tries to recognise AS as As. So when I search for postcode = "XX1 1AS" it changes it to postcode = "XX1 1As" it still does it when I try all @lower or @upper.
 

Brian Element's picture
Brian Element
Offline
Joined: 07/11/2012 - 19:57

Hi mingche1984 and welcome to the site.

Is that the code in IDEAScript that is causing the problem, as that is strange.  What you are talking about does happen in the editor when you have mutliple quotation marks within an equation.  The following is an example:

You can see on the task.AddExtraction line that some of the items are red and others are in black even though the entire item is a string.  This is a quirk of the editor and we have to work around it.  If I entered any basic key words into the area that is black the editor would do like it is doing for you.

The way to get around this is to write the string using chr(34) in place of the double quotes before the account description names in this instance.  So the above equation would be rewritten like this:

It makes the equation a bit longer but you will notice that all the string items are now red as they are supposed to be and the editor won't go changing items on you because it is mixed up.

Let me know if this doesn't relate to the problem you are having.