Skip to main content
Known Participant
September 29, 2014
Question

How do I use the NOT boolean operator in WebHelp output

  • September 29, 2014
  • 3 replies
  • 1140 views


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

This topic has been closed for replies.

3 replies

Inspiring
April 27, 2018

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.

Inspiring
April 27, 2018

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.

Inspiring
April 27, 2018

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%2FRoboHelp_search_basics-.htm) 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.

Jeff_Coatsworth
Community Expert
Community Expert
April 27, 2018

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.

Peter Grainge
Community Expert
Community Expert
October 20, 2014

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

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.
Inspiring
January 7, 2015

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

Jeff_Coatsworth
Community Expert
Community Expert
January 7, 2015

Yes, you can mess around with the .lng file via the Project Settings to change any wording you want to display. So?