Jump to content

We have are having an issue with using a customer name as a ...


Robert Kottelenberg

Recommended Posts

For a single value variable, this would seem to reproduce your issue:

-SET &REGION = 'Movin'' Air';

-SET &ECHO=ON;

DEFINE FILE ggsales

TEST/A15 = 'Movin'' Air';

END

TABLE FILE ggsales

PRINT *

WHERE TEST EQ '&REGION'

END

 

 

It looks like the issue occurs only when there is a space following the single quote mark.

You should be able to fix it with a -SET statement to use the REPLACE function to change the single quote mark into two of them. See the second set statement.

-SET &REGION = 'Movin'' Air';

-SET &REGION = REPLACE(&REGION, '''', '''''');

-SET &ECHO=ON;

DEFINE FILE ggsales

TEST/A15 = 'Movin'' Air';

END

TABLE FILE ggsales

PRINT *

WHERE TEST EQ '&REGION'

END

 

If your variable has multiple values where single quote marks are used to enclose each of the data values, then it gets more tricky. Might be useful to use REGEXP_REPLACE to accomplish it.

Link to comment
Share on other sites

We have are having an issue with using a customer name as a filter on our dashboard. The name causing the problem is Movin Air. It is the at the end of the word that is the problem. Names with 's are not causing issues.

For example, I have a ranking report for our customer information, that rolls up sales data. The user clicks on the name of the customer to see sales data. It works fine with other names, but this one causes the details fex to not work. I have tried using QuotedString when on the called or in the details fex and that causes it to say no data found (for all customers).

I get the same behavior if the the customer name is shared filter on the page.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...