Conditional text based on variable content?

This forum is for Single-Sourcing your Flare content to multiple outputs.

Conditional text based on variable content?

Postby FeeMaher on Mon Nov 25, 2019 12:25 am

I have come across a new problem and am wondering how others deal with it.
I have a variable for 'product name'. If I use the word 'a' before the product name variable e.g. this is a 'product name' requirement, or a 'product name' user is required to x x x.
However, two of the product names I have start with a vowel. So when I build the target, I actually need the word 'an' instead of 'a'. The product name variable isn't always preceded with an 'a', so I can't add the 'an' or 'a' to the variable content without causing a problem.

Any ideas?

Thanks in advance!
FeeMaher
Jr. Propeller Head
 
Posts: 9
Joined: Thu Sep 12, 2019 9:35 pm
Location: Melbourne, Australia

Re: Conditional text based on variable content?

Postby ChoccieMuffin on Mon Nov 25, 2019 10:07 am

Think you're going to need two variables - "a [product_name]" and "[product_name]" - and use whichever one is appropriate in the circumstance. Probably not ideal, but better than nothing.
Started as a newbie with Flare 6.1, now using Flare 2019r1.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
ChoccieMuffin
Senior Propellus Maximus
 
Posts: 2168
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Conditional text based on variable content?

Postby doloremipsum on Mon Nov 25, 2019 2:23 pm

I have the same very frustrating problem - our products and companies vary between vowels and consonants. I use snippets with condition on the [n] so it will only appear in some outputs (easier than creating new variables for me). Note that you will need two - one for small a(n) and one for capital A(n)!
doloremipsum
Propeller Head
 
Posts: 48
Joined: Mon Aug 26, 2019 2:11 pm

Re: Conditional text based on variable content?

Postby FeeMaher on Mon Nov 25, 2019 3:20 pm

Ah yes good point on the capitalisation! Thanks for your feedback :)
FeeMaher
Jr. Propeller Head
 
Posts: 9
Joined: Thu Sep 12, 2019 9:35 pm
Location: Melbourne, Australia


Return to Single-Sourcing

Who is online

Users browsing this forum: No registered users and 3 guests