Copy link to clipboard
Copied
I am using RH 11 and am trying to figure out how to use the NOT boolean operator in my WebHelp out.
For example, when I type "Body NOT text" (no quotes), I get the following message:
"The words you typed is not a valid expression."
Am I doing something wrong here or does this not work?
Thanks,
Mack
Copy link to clipboard
Copied
Take a look at RoboHelp's own help. Enter Search in the search box and click first topic.
You can search for BODY and TEXT or BODY or TEXT.
What is the objective here?
See www.grainge.org for RoboHelp and Authoring tips
Copy link to clipboard
Copied
Here's the code, for anyone who can figure out what causes the "words you typed is not a valid expression" to display:
opengovplatform-beta/robohhre.lng at master · opengovplatform/opengovplatform-beta · GitHub
Copy link to clipboard
Copied
Yes, you can mess around with the .lng file via the Project Settings to change any wording you want to display. So?
Copy link to clipboard
Copied
Hi Jeff,
Of course the message is irrelevant. Perhaps someone can tell from the code what the illegal attempted search functions are. Merely testing by entering symbols and terms in search brings up the message without certainty. For example, "or" and "OR" don't work, but "|" does.
Copy link to clipboard
Copied
Sorry, what are you trying to figure out? If you enter characters or search terms in the search field that the JavaScript doesn’t understand, it’s going to throw an error – the wording of the error message is governed by the wording in the relevant line of the .LNG file.
Copy link to clipboard
Copied
You are perfectly correct. I understand the js response. The message
doesn't matter.
I merely updated the thread, which is posted in several places and goes
back to RH7, to note that the message has not yet been identified for
specific search symbols/terms. I hope that the next RH user to be
frustrated with search will check the js and be able to identify the
incorrect search terms/symbols that bring up the message.
However, no one has done so in all these years, so I'm not holding my
breath, and won't spend more of your time or mine on it. Thank you for
responding to what seemed to you to be the problem. That was thoughtful of
you. May you have a warmer afternoon than we are having here.
Copy link to clipboard
Copied
I have the same problem. Using RH 2017, with latest updates installed, to build WebHelp. Boolean operators AND and OR work as expected in the search tool. However, if I try to use operator NOT, I don't get any results and it throws the "The words you typed is not a valid expression." error message. My understanding (based on RH's Help here: https://help.adobe.com/en_US/robohelp/2017/robohtml/index.html#t=book%2Frob_linknavigate_li%2FRoboHe...) is that AND, OR, and NOT are all supported for WebHelp output in RH 2017.
Thoughts on what's triggering the error - and how to get NOT working?
As an aside, Adobe might consider replacing this error message with one that's grammatically correct in a future update.
Copy link to clipboard
Copied
Looks like NOT isn't working after all - you'd better raise a bug with Adobe - use the Tracker link on the main page of this forum.
Copy link to clipboard
Copied
Also report the message in the bug.
Meantime though you can change it in the LNG file. Look for JS_Alert_Invalid_Expression_1
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
Calling all JS developers. I did some digging and discovered this Boolean operation code in whfhost.js:
// Boolean operation
switch ( a_Node.eType )
{
case ESNT_OR:
return ( fWeightLeft + fWeightRight ) / 2.0;
case ESNT_AND:
return ( fWeightLeft * fWeightRight );
case ESNT_NOT:
fWeightRight = ( fWeightRight == 0.0 ) ? 1.0 : 0.0;
return fWeightLeft * fWeightRight;
}
Does anything look obviously wrong/incorrect for the NOT operator? Finding this is about as far as I can take it. I'm not a developer, though if someone is able to provide the correct code (assuming it's as simple a fix as that), I'm comfortable editing the JS to insert it and then capable of manually deploying and maintaining it until a wider fix is applied/automatically handled in an RH update.
Copy link to clipboard
Copied
One more piece of info on this issue. If I generate the same project as Responsive HTML output, and use the AND, OR, and NOT operators in search, I get the following results (project contains topics about gift cards and credit cards):
credit and gift = 57 topics/results
credit or gift = 236 topics/results
credit not gift = 57 topics/results
Observation: While I don't get the error message that I get in the WebHelp output for the NOT operator, it appears to instead act like the AND operator.