# Fact Sentence with Value switch, assistance please

**URL:** <https://community.rootsmagic.com/t/fact-sentence-with-value-switch-assistance-please/4122>\
**Category:** RootsMagic\
**Tags:** question\
**Created:** [March 20, 2022, 5:45pm UTC](https://community.rootsmagic.com/t/fact-sentence-with-value-switch-assistance-please/4122 "2022-03-20T17:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alainemk](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alainemk](https://community.rootsmagic.com/u/alainemk)\
**Post date:** [March 20, 2022, 5:45pm UTC](https://community.rootsmagic.com/t/fact-sentence-with-value-switch-assistance-please/4122/1 "2022-03-20T17:45:16Z")

</div>

I am trying to write a fact sentence to read one way if [PlaceDetails] is present and another way when not present. The sentence is picking up the condition for True but not when False. It is not inserting the default “In” prior to the [Place:Short] when the condition is false. I have tried using [Place:In:Short] but that’s not working either. Suggestions please? I am using: [Person] was born\< [Desc]\>\< [Date],\> \<\<?[PlaceDetails]|[PlaceDetails],\>\< [Place:Short:Plain]\>|\< [Place:Short]\>\>.

---

<div class="post-metadata">

**Author:** ![jnunnally](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jnunnally](https://community.rootsmagic.com/u/jnunnally)\
**Post date:** [March 21, 2022, 3:36am UTC](https://community.rootsmagic.com/t/fact-sentence-with-value-switch-assistance-please/4122/2 "2022-03-21T03:36:57Z")

</div>

It is a little difficult to tell what you expect as a result, could you give some example data and what you want the result to be?

Here is an interpretation of your sentence, as it is:

First you have the expression “\<?[PlaceDetails]|[PlaceDetails],\>”. That says, “if PlaceDetails is not empty, write PlaceDetails followed by a comma.” There is no false condition specified.

Then you have a simple switch with begins with the “\<” after \<[Date],\> and ends with the “\>” at the end of the sentence. The simple switch has two values separated by the last vertical bar in your sentence. So it reads something like this:

If the PlaceDetails expression OR [Place:Short:Plain] either one (or both) produce a result, use it. If neither the PlaceDetails expression nor the [Place:Short:Plain] produce a result, then use [Place:Short] if it has a value.

That doesn’t seem to be doing what you describe as the desired result, but I need to know more about what you expect to suggest a correction.

Here is something that MIGHT do what you want…  
[Person] was born\< [Desc]\>\< [Date]\>, \<?[PlaceDetails]|[PlaceDetails]\<, [Place:Short:Plain]\>|\< [Place:Short]\>\>.

Hope this helps.

---

<div class="post-metadata">

**Author:** ![alainemk](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@alainemk](https://community.rootsmagic.com/u/alainemk)\
**Post date:** [March 21, 2022, 10:30am UTC](https://community.rootsmagic.com/t/fact-sentence-with-value-switch-assistance-please/4122/3 "2022-03-21T10:30:56Z")

</div>

Thank you so much! Your sentence template is just what I was looking for. I knew I did not have the angle brackets correctly positioned to read the false side of the equation. Yes, the placement of the comma is important to the sentence when using {Place:Short:Plain] where I am trying to lose some extra prepositions when what was once a separate town or village became incorporated as a neighborhood of a larger city. Examples being Maryhill, Glasgow, Scotland rather than “ **at** Maryhill **in** Glasgow, Scotland.”
