Normal Topic XPost question (Read 2445 times)
PianoMan
Member
Members
*
Offline


No personal text

Posts: 44
Joined: Oct 13th, 2004
XPost question
Dec 16th, 2004 at 6:19pm
Print Post Print Post  
I have discovered that XPost will return an Error if the key value includes a parenthesis.
Example -  Bob Jones (Home)
For some reason it does not recognize a match when there is a parenthesis.
I can find no documentation on this. Is it a bug?

Thank you
  
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: XPost question
Reply #1 - Dec 16th, 2004 at 10:37pm
Print Post Print Post  
Hello Jon,

Are you sure there is an external record that matches that key value?

Are you sure you are not in preview mode?

I just tested it here and it appears to be working.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2480
Joined: Aug 20th, 2003
Re: XPost question
Reply #2 - Dec 17th, 2004 at 3:10pm
Print Post Print Post  
Hello Jon,

Looking at your database the problem is not the parenthesis alone it is the combination of the ^ character and the parenthesis that is causing the XPost to fail. If you replace the ^ character which you are using to keep data separate with another character you will be fine.

From what I understand of your application, you may want to look into passing a unique identifier in along with the rest of the data. ex.  12:04^Bob Smith (Home)^123  In this case 123 is the unique key for the record that you selected and you can use 123 in the XPost instead of passing 12:04^Bob Smith (Home) through the XPost.

That is the recommended way, but if it doesn't work for you I believe of all the single characters that you could pass the pipe '|' character is probably the safest.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
PianoMan
Member
Members
*
Offline


No personal text

Posts: 44
Joined: Oct 13th, 2004
Re: XPost question
Reply #3 - Dec 17th, 2004 at 5:07pm
Print Post Print Post  
Thank you, Ray.
I find it puzzling that the combination of certain characters will cause XPost to fail. That seems like a bug to me.
The idea of a number identifier for each record had crossed my mind; that's always a good idea.

--Jon
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: XPost question
Reply #4 - Dec 17th, 2004 at 5:57pm
Print Post Print Post  
Quote:
Thank you, Ray.
I find it puzzling that the combination of certain characters will cause XPost to fail. That seems like a bug to me.
The idea of a number identifier for each record had crossed my mind; that's always a good idea.

--Jon


I'm not sure it isn't a bug. A lot of characters are significant to Q&A search syntax, and an equally large set are significant to regular expression syntax. Sesame translates Q&A syntax into a regular expression and passes that to a regex parser which compiles it and uses the result to evaluate the "match". It may be failure on my part to eliminate this particular pre-existing reg-ex construct before the search string gets parsed by the regex compiler. It may be that this is one combination that was simply not anticipated within the parser when trying to perform the match. Usually, "^" is the start of line anchor match character and parenthesis group binary expression to affect evaluation order.

In regex, you can say:
^M.*B$

To mean: find a string that starts at the start of line with M and ends with B at the end of the line, with anything inbetween.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
PianoMan
Member
Members
*
Offline


No personal text

Posts: 44
Joined: Oct 13th, 2004
Re: XPost question
Reply #5 - Dec 17th, 2004 at 7:14pm
Print Post Print Post  
Thank you, Mark.
I see what you're saying. And of course, there will be procedures that call for certain character restrictions. That's unavoidable.
In this case, I just happened upon a rare combination, and it appears that there are plenty of alternatives.
Your expertise will determine if it's a bug or just a restriction.

--Jon
  
Back to top
IP Logged
 
PianoMan
Member
Members
*
Offline


No personal text

Posts: 44
Joined: Oct 13th, 2004
Re: XPost question
Reply #6 - Dec 18th, 2004 at 6:47pm
Print Post Print Post  
Perhaps this XPost issue needs to be looked at more closely. Upon further testing, I have found that Xpost does not behave as expected with certain characters, including the "|" (pipe).
I spent an entire day on this, devising workarounds, etc. only to finally discover the problem was the pipe. In my test, the XPost does not fail, yet if there is a pipe in the string, it posts wrong values. Get rid of the pipe, and everything is perfect.
I am using the pipe with no other symbols. Wrong values are posted depending on the order in which the posts happen. Very strange...

--Jon
  
Back to top
IP Logged