Skip to main content
Question

Rich Text formula 'expecting text' at the end of formula

  • February 19, 2024
  • 0 replies
  • 125 views

Forum|alt.badge.img+6

I have a Rich Text Formula to display values from fields in a paragraph format. I have searched and tried so many different things but I can't seem to figure out what I am doing wrong. Please note, I will add the else statement which would be for a female, but I need to get the first part fixed first. I'm not sure if the / in the field names is actually throwing the error or not. I don't want to rename them if I don't have to.

For this version, the ) at the end is yellow highlighted and it tells me 'expecting text'. The fields are in green text so I feel I'm on the right track with this version.

If(
[Sexo / Sex]="Male",
[Primer Nombre / First Name]&" is an "&[Personalidad del Nino / Child's personality]&" boy who enjoys "& [Pasatiempos / Hobbies]&". He loves"&[Animal Favorito / Favourite Animal]&" and eating "&[Comida Favorita / Favourite  Food]&". His favorite subjects in school are "&[Clases favoritas en la escuela / Favorite Subjects in School]&"."& [Primer Nombre / First Name]&" would like to become a "& [Aspiracion/ambicion/meta del nino / Career aspiration and goals of child]&" in the future."&
)  

If I had the <p> to the beginning and end, then it highlights the period at the end of the first sentence stating there is a syntax error. Also, the field names in this version are not in green text which also tells me it doesn't like my syntax.

If(
[Sexo / Sex]="Male",
"<p>[Primer Nombre / First Name]&" is an "&[Personalidad del Nino / Child's personality]&" boy who enjoys "&[Pasatiempos / Hobbies]&". He loves"&[Animal Favorito / Favourite Animal]&" and eating "&[Comida Favorita / Favourite  Food]&". His favorite subjects in school are "&[Clases favoritas en la escuela / Favorite Subjects in School]&". "&[Primer Nombre / First Name]&" would like to become a "& [Aspiracion/ambicion/meta del nino / Career aspiration and goals of child]&" in the future."&
</p>"
)

Any ideas?



------------------------------
Amy Gosz
------------------------------
This topic has been closed for replies.

  • Quickbase Alumni
  • February 19, 2024
Amy,

When using <p> and </p> be careful to enclose them in quotes, before and after, like this ...
[Some field] & "<p>" & [Some other field] & "some words or sentences" & "</p>"

Same goes for other permitted HTML tags, such as <b> etc.

Alex Wilkinson



  • Quickbase Alumni
  • February 19, 2024
Amy, also for the error message on your first example (without <p>) I think you need to remove the & just before the closing ). The & means "here comes some quoted text or a bracketed text-field, but it's not there.
Alex