As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have an amper variable, &A, that is passed from a calling fex and it's value is "**** & Jane" with an embedded ampersand.
I want to create a dynamic WHERE statement that looks like this: -SET &W = WHERE LOOKUP EQ '&A'; and I cannot get the code to look past the ampersand embedded in the variable &A. My results for &W end up looking like this: WHERE LOOKUP EQ '**** ';.
I have tried all kinds of things and I haven't hit the correct syntax. Can anyone help?
Thanks,
NorbThis message has been edited. Last edited by: Kerry,
Nope that's not working. Perhaps I can be more clear about what I'm doing.
I basically have a WHERE statement that looks like this:
WHERE LOOKUP EQ '&LOOKUP';
and I pass the &LOOKUP value from a calling fex. When the value of &LOOKUP does not contain an ampersand the query works great. So if the value of &LOOKUP is equal to "Norb" everything works and the WHERE statement expands to
WHERE LOOKUP EQ 'Norb';
If value of &LOOKUP is equal to 'Norb & Chubby" then the expanded statement gets truncated and ends up looking like this
WHERE LOOKUP EQ 'Norb '
which in turn is an invalid value and the query fails. How can I prevent the truncation when a string contains an ampersand?
This works for "A & P" but not when the incoming amper contains "A&P" . . . the lack of a space after the ampersand makes quite a difference. Has anyone managed to get it to work with an ampersand followed immediately by another character?
J.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
That failed for me yesterday, but I will try again this morning when my brain is a little sharper. I may have missed something.
I'm making the call from Maintain and when I do that it appears to fail. When I just do a -SET to test the unit it runs correctly. That leads me to believe that somehow Maintain is booting the send, but that's kind of perplexing.This message has been edited. Last edited by: John_Edwards,
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
I just need to drop it into a simple WHERE clause. It works for a simple call or for defaults that I set in the focexec.
But, for a call from Maintain, it's not working and it's just not telling me why it isn't. If I attempt to pass the amper variable back to Maintain I get an empty field. This has turned into one great big hole that I'm pouring hours into, and my project simply cannot afford so much time on such a picayune little problem.
Given my short list of incoming text strings and the almost assured need for each of them to be human readable (they're all company names) I've made the following compromise, since anything with an amper followed by a character is imploding:
-- Convert all & to % prior to sending, and then use the result in a LIKE clause instead off an EQ clause.
What results is WHERE PAYEE_NAME LIKE 'A%P SHOPPING';
This works, but in theory could return records that shouldn't apply. I think I'm safe, but Jeeze-Louise trying to get an amper to just act like any other character should NOT be this hard. They're frikkin' everywhere.
I'm concerned it has something to do with the GET or POST command sent via Maintain to the focexec. That is absolutely positively beyond my control.
S.
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007
In my Maintain I have: Compute X/a10 = 'A&P'; Exec Proc From X
In Proc I have: TABLE FILE file PRINT fields WHERE STORE EQ '&1.EVAL'; ON TABLE PCHOLD END
Without the .EVAL I was getting A&|P. With it I get A&P.
If you even need to see EXACTLY what is going on in an EXECed procedure, place: -SET &ECHO=ALL; at the top of your procedure. Then in your Maintain, place an HTMLTable on the your form populated by FOCMSG.MSG.
Mark
Posts: 663 | Location: New York | Registered: May 08, 2003