• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Problem with writing a proper condition expression in RH20

New Here ,
Nov 15, 2022 Nov 15, 2022

Copy link to clipboard

Copied

Hi, I'm struggling to understand the logic of condition expressions and I have a hard time defining the expression that meets my needs.

I have three client tags : Client A, Client B, Client C.

I have two output tags : Online and Print

Text can be tagged with multiple tags, since some functions are common to Client A and B, or Client A and C, or Client B and C.

Furthermore, in my help topics, I have links to help pages that are specific to one client and that are tagged with Online and Client A, or Online and Client B, etc. And I have links that are common to all clients that are tagged only with Online (since I don't want them in a printed output). 

When I produce my online help for Client A, I want to see text that is tagged with : 

  • Client A
  • Client A and Client B
  • Client A and Client C
  • Online
  • Client A and Online
  • Client A and Client B and Online
  • Client A and Client C and Online

I have successfully built a condition expression that includes all the text tagged Client A, whether alone or in combination with another Clients tag or with the Online tag, and excluded any text tagged with Print. Which is almost what I want.

However, I can't find a way to include also text that is tagged with Online only. Is it possible ? If yes, how ?

 

Here is the condition that I have written so far.

     EXCLUDE when Clients is B

     OR

     EXCLUDE when Clients is C

     AND

     EXCLUDE when Output is Print

     AND

     INCLUDE when Clients is A

 

Whenever I want to introduce Online either with AND or OR, I don't get the result I want.

My first try was to add "OR INCLUDE when Output is Online" at the end, but this makes all texts tagged with Online visible, including the text not tagged with Client A but tagged with Client B and/or Client C that I want hidden.

I have made several other attemps by moving my "OR INCLUDE when Output is Online" elsewhere in the condition, and I also tried with "AND INCLUDE when Output is Online" at various places, but I can't get the right result. I can't understand the logic...

Does anyone have a solution ?

Thanks in advance.

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

@Heye27311545spiw What has your question got to do with this thread or Adobe's RoboHelp product which this forum is for? 

 

You need to reply to the correct thread or ask in the Creative Cloud forum.

________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2022 Nov 28, 2022

Copy link to clipboard

Copied

@Peter Grainge Thanks a lot, I will try with creating duplicate tags "B_Only" and "C_Only". I hoped a solution would exist that wouldn't require additional tags, but if it is the only way to reach the result I want... 

Thank you both @Peter Grainge and @Amebr for the time you spent on this problem.  I am very grateful for your help.

I will let you know if the solution works in my context.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 28, 2022 Nov 28, 2022

Copy link to clipboard

Copied

@Peter Grainge OK, I set up my project to follow yours, and I don't have the same result.

Actually, I don't understand two of your explanations under your section "Additional requirements", when you say, for "B and Client C - Client B Only will exclude this (...)" and the same for "Client B and Client C and Online - Client B Only will exclude this".
Here is my result : (in bold and underlined, what I want to see and highlighted in yellow, what I don't want to see but which is nevertheless displayed).

Milsademon_0-1669647219105.png

Here is my condition expression.

Milsademon_1-1669647364596.png

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2022 Nov 28, 2022

Copy link to clipboard

Copied

Look at my tagging.

 

image.png

 

In your expression you have not excluded those. However, they need to be tagged differently and the expression needs to exclude B_Only and C_Only. Strictly just the first one for this text but you need C_Only for content that might only be tagged C_Only.

 

See the tagging and the expressin in this post in the thread.

 

https://community.adobe.com/t5/robohelp-discussions/problem-with-writing-a-proper-condition-expressi...

 

I can send you the project if you email my via my Contact page.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

Looking through all this again and at @Amebr's project, I think the issue is the use of Include. I'm sure there are scenarios where they might work but I'm not seeing one. By default everything in the TOC used is included so you only need to exclude what you don't want. I have demonstrated how "my" expression seems to meet all the scenarios for Client A. For Client B it would be a simple modification.

 

@Milsademon Is there any scenario where the expression does not work for Client A?

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

@Peter Grainge You have to use "Include" in this case, otherwise the paragraphs tagged with multiple conditions are excluded because those other conditions are excluded - It's sort of an override. I think that's what might be different with New UI - it's not handling the "include" statement properly.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

I'll send you my project tomorrow and you will see they are getting included. It's also shown in my images.

________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

The image in the output image tells you which tags are applied. Unless I have got it wrong, what is shown above the image is what is required for Client A.

________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

Ah you mean with your duplicate condition tag work around. Yes, with the duplicate (Client_B_only) condition tags you wouldn't need to use Include. But in my opinion, having the duplicate tags shouldn't be needed (and wasn't in Classic)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 26, 2022 Nov 26, 2022

Copy link to clipboard

Copied

Maybe not but it solves the issue. I will flag this with Adobe. 

________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2022 Nov 28, 2022

Copy link to clipboard

Copied

It requires some new tags but the expressions will be shorter. I'll let you know if I get more information from Adobe.

________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2022 Nov 28, 2022

Copy link to clipboard

Copied

Be aware B_Only is not a duplicate tag, it is a different tag.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 29, 2022 Nov 29, 2022

Copy link to clipboard

Copied

I finally got it !

@Peter Grainge Your reminder finally triggered illumination 🙂

"The key thing to remember is

  • With AND expressions any content that has any one of the tags will get excluded.
  • With OR expressions all the tags in the expression have to on the content."

Below is the condition expression that I ended with (after creating the additional tags Client_A_Only, Client_B_Only, as you suggested, and retagging my text with those tags), which works when I generate my online help for Client A and that I can easily transpose to Client B and it also works !!!

Milsademon_0-1669729878680.png

And here is the result, which is exactly what I want.

Milsademon_1-1669730017317.png

Thank you very much again @Peter Grainge and @Amebr !!!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 29, 2022 Nov 29, 2022

Copy link to clipboard

Copied

Not quite. The first two tags in your expression are not needed but they should do no harm. See my expression.

 

Glad it's sorted.

________________________________________________________

My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

 

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

I'm very late to this thread, but I just spent some time working through the logic of conditional expressions. I think you can set up expressions for Print/Online and Client_A/Client_B/Client_C, etc., without needing special Client_A_Only conditions.

 

A. Logic of condition expressions, as I understand it. I know this isn't exactly how others have explained it, but I did quite a bit of testing of different scenarios. This seems to check out, and it does map reasonably well to standard Boolean logic.
1. All the ANDs are evaluated before the ORs. So
"A and B or C and D" is evaluated as "(A and B) or (C and D)". This means that each OR clause is a separate test.

2. A conditional element is included in the output if at least one of the OR clauses is true. All of the AND clauses within an OR clause must be true for the OR to be true.

3. "Include" is true if the condition is set on an element. "Exclude" is true if the condition is not set (essentially equivalent to NOT).

4. In my testing, it looks like an "Include" flag can only be set within one OR clause for a given value. If it's set in multiple clauses, then only the last clause is used. There might be something else going on here, but that's my best guess.

 

B. Example:
For my project, I have Platform as Print/Online, and Product as Prod1/Prod2/Prod3/Prod4. To generate Print output for Prod1, I want everything that is Print (without any other conditions), plus everything that is for Prod1, unless it is also tagged Online. This captures Print, Prod1, Prod1/Print, Prod1/Prod2, etc. That is,
(Platform = "Print" AND no Product conditions set) OR (Product = "Prod1" AND Platform NOT= "Online")

 

The .expn source looks like this. The UI will follow the same structure, but I find the .expn easier to read. As far as I can tell, the flags on the <group> element are not used for condition expressions. Maybe they are used for dynamic content filters.

<?xml version="1.0" encoding="UTF-8"?>
<expr>
	<group flag="Exclude" op="AND">
		<tag name="Platform" value="Print" flag="Include" op="AND"/>
		<tag name="Product" value="Prod1" flag="Exclude" op="AND"/>
		<tag name="Product" value="Prod2" flag="Exclude" op="AND"/>
		<tag name="Product" value="Prod3" flag="Exclude" op="AND"/>
		<tag name="Product" value="Prod4" flag="Exclude" op="OR"/>
		<tag name="Product" value="Prod1" flag="Include" op="AND"/>
		<tag name="Platform" value="Online" flag="Exclude" op="OR"/>
	</group>
</expr>

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

Hi @Sundorne Thanks for posting your testing.

 

My expression (which worked in Classic) writes out using your #1 logic as:

(A AND NOT Print) OR (Online AND NOT B AND NOT C)

 

However, in new UI it is excluding content tagged (Online AND A)

 

I also am not sure I understand your #4 - are you saying you can only use INCLUDE once per expression or only one per condition tag?

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

Hi @Amebr Hmmm, #4 might actually explain some of the issues, if only I understood what it actually means. 😞

 

The condition expression seems to be very sensitive to the order. If you re-write your expression to

(Online AND NOT B AND NOT C) OR (A AND NOT Print)

does it make any difference?

If so, my explanation above is incomplete or maybe wrong. It's like the later clause breaks some of the logic from the earlier clause. I just don't know what the rules are.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

Wow...

 

 

This expression:

Amebr_0-1709264700404.png

produces this:

Amebr_1-1709264721589.png

 

If I switch the order of the groupings:

Amebr_2-1709264798421.png

it produces this:

Amebr_3-1709264814565.png

This is the required output I believe.

 

I set it all up in a spreadsheet and tried to manually select the paragraphs using different interpretations of the logic but can't come up with any consistent logic to achieve each outcome. Only Adobe can answer and/or determine if there is a logic error in the code somewhere.

 

In any case @Milsademon may be interested to know there's a solution that doesn't require extra condition tags, if they want to re-do it at some stage.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 29, 2024 Feb 29, 2024

Copy link to clipboard

Copied

Okay, I found the logic (but it's different from the Classic logic where reversing the grouping made no difference).

 

You have to evaluate each step of the condition sequentially by adding for an Include step and removing for an exclude step.

 

So for (Client_A AND NOT print) OR (Online AND NOT Client_B AND NOT Client_C):

1. Select everything with Client_A

2. Remove anything from the selection that includes Print.

3. Add to the selection anything that includes Online (even if you previously removed it)

4. Remove anything from the selection that include Client_B or Client C.

 

Here's my working:

All Tag Combinations Select Untagged Select all A Remove Print Add all Online Remove B and C
Untagged Untagged Untagged Untagged Untagged Untagged
Print only   Client A Client A Online only Online only
Online only   Client A and Online Client A and Online Client A Client A
Client A   Client A and Print Client A and Client B Client A and Online Client A and Online
Client B   Client A and Client B Client A and Client C Client B and Online  
Client C   Client A and Client C Client A and Client B and Online Client C and Online  
Client A and Online   Client A and Client B and Online Client A and Client C and Online Client A and Client B  
Client B and Online   Client A and Client C and Online   Client B and Client C  
Client C and Online   Client A and Client B and Print   Client A and Client B and Online  
Client A and Print   Client A and Client C and Print   Client B and Client C and Online  
Client B and Print       Client A and Client C and Online  
Client C and Print          
Client A and Client B          
Client B and Client C          
Client A and Client C          
Client A and Client B and Online          
Client B and Client C and Online          
Client A and Client C and Online          
Client A and Client B and Print          
Client B and Client C and Print          
Client A and Client C and Print          

 

Similarly for (Online AND NOT Client_B AND NOT Client_C) OR (Client_A AND NOT Print):

1. Select everything with Online

2. Remove everything from the selection contaiing Client_B or Client C.

3. Add to the selection anything containing Client_A (even if you just removed it)

4. Remove from the selection anything containing Print.

 

And again, my working:

All Select Untagged Add all Online Remove B and C Add all A Remove Print
Untagged Untagged Untagged Untagged Untagged Untagged
Print only   Online only Online only Online only Online only
Online only   Client A and Online Client A and Online Client A Client A
Client A   Client B and Online   Client A and Online Client A and Online
Client B   Client C and Online   Client A and Print Client A and Client B
Client C   Client A and Client B and Online   Client A and Client B Client A and Client C
Client A and Online   Client B and Client C and Online   Client A and Client C Client A and Client B and Online
Client B and Online   Client A and Client C and Online   Client A and Client B and Online Client A and Client C and Online
Client C and Online       Client A and Client C and Online  
Client A and Print       Client A and Client B and Print  
Client B and Print       Client A and Client C and Print  
Client C and Print          
Client A and Client B          
Client B and Client C          
Client A and Client C          
Client A and Client B and Online          
Client B and Client C and Online          
Client A and Client C and Online          
Client A and Client B and Print          
Client B and Client C and Print          
Client A and Client C and Print          

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 01, 2024 Mar 01, 2024

Copy link to clipboard

Copied

LATEST

Thanks for this. Nicely laid out. I'm going to try to wrap my head around it, but it will take a bit of time. When I get a chance I'll try different combinations of

OR - Include

OR - Exclude

AND - Include

AND - Exclude

to see if that adds a new complication.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp