@frederikdc (or anyone else from the team - @bram or @olgatrykush) would you help me to configure one extra formula?
I have a singe-select field with just two items to select - “male” and “female”.
I need to create the formula that will generate the proper text according to a single-select item.
F.e. if there is “male” selected, then the formula field should output the text “Dear sir,” and if “female” is selected, then the output text should be “Dear madam,”.
This is probably a very simple thing for you, but I need to gain some more experience.
Btw. is there any web section on the internet (or at baserow website), where the principles for creating formulas, working with them, how to work with syntax, including some examples for a real beginner, like me? I feel I really need and want to learn, how to work with it.
Hey, thanks. It works well.
What if I would like to do one enhancement like this: if there is (for some reason) no single select item selected (I mean, I keep it to be empty), I would like or 1) to add the text “Dear sir, dear madam,” or 2) to keep it empty, so no text. Right now if there is no single-select item, then always “Dear madam,” is used.
To achieve this you can use a nested if() clause.
Firstly, you check if a field is empty, if not – you use nested if from the example above to check which exact option is selected: