Skip to main content
QuintinSeegers
Legend
November 6, 2022
Answered

Limit Element to first or last (FM2022)

  • November 6, 2022
  • 1 reply
  • 192 views

In one of our elements, CELLTEXT, we have the following General Rule (<TEXT> | Emphasis | BulletList | NumList | Action | Highlight)*Another element, SLIDE, can appear only appear once, either as the first element within CELLTEXT before those in the General Rule, or the last element after those in the General Rule.

 

I can change the General Rule to be Slide?,  (<TEXT> | Emphasis | BulletList | NumList | Action | Highlight)* so it can appear first, or  (<TEXT> | Emphasis | BulletList | NumList | Action | Highlight)*, Slide? so it can appears last. Is there a way to combine these into a single General Rule?

    This topic has been closed for replies.
    Correct answer QuintinSeegers

    I've managed to solve it - I'd forgotten about using &, meaning the elements can appear in any order. By having the General Rule as Slide? & (<TEXT> | Emphasis | BulletList | NumList | Action | Highlight)*, the Slide element can either preceed or follow those elements in parenthesis.

    1 reply

    QuintinSeegers
    QuintinSeegersAuthorCorrect answer
    Legend
    November 7, 2022

    I've managed to solve it - I'd forgotten about using &, meaning the elements can appear in any order. By having the General Rule as Slide? & (<TEXT> | Emphasis | BulletList | NumList | Action | Highlight)*, the Slide element can either preceed or follow those elements in parenthesis.