Explain the problem as you see it
When using "Build title from fields" function with a formula hiding it if the field is empty i.e. using "|?"
${fieldname|?}
there is no way to add anything more there besides field content itself. There is no way to create simple visual structure of the title with multiple fields.
For example a node with fields:
Name
Surname
Maiden name
and formula of${Name}${Surname}(${Maiden name|?})
will always show "()" at the end if the >Maiden name field is empty.
Why is this a problem for you?
I don't have an ability to make a proper node title build based on fields because some of them are often empty, but if filled, need to have some kind of a separator. It will also remove the problem with muliple spaces.
Suggest a solution
Allow conditional syntaxes for "Build title from fields" like:
IF(condition;if true;if false)
IF(${Maiden name}=NOT EMPTY;" (${Maiden name})";"")
2 Comments
I like this idea! Going with an excel (typical spreadsheet) function makes it more accessible. One tricky tech question would be if it could / sould allow multiple "if" statements in sequence, and/or nested "if" statements (I can build some pretty convoluted stuff in excel if I am in the mood to really dig into large datasets)
One possible use case for me would be when I have a scheduled date that is past a due date. The title can then have a "overdue" indicator (!) behind the scheduled date (or make it red, in a glorious future where we can put formatting strings into titles). If it is not yet overdue, the scheduled date remains black with no enhancements.
I would love to have more control of what is appearing in the title, not only showing the fields that are relevant (that is what we have now) but for the values that really requires some especial attention. For example, I don’t need to see if a task is assigned to me, because I use to be the owner for 90% of the tasks. I just want to see a value when the owner of the task it is not me.