Name a tiddler based on some fields

Only if the tiddler has ‘Remote’ in the field ‘Location’ do I want to name the tiddler using contents of the field ‘Reference’ and ‘Scheduled’. ‘Reference’ carries names of persons. ‘Scheduled’ is a date field in TW format,

So, if Reference has ‘[[John Adams]]’ and ‘[[Thomas Edison]]’ and ‘Scheduled’ has ‘202201081905000’, I want to name the tiddler ‘2022-01-08 Sat Doctor Engineer’ where ‘Doctor’ and ‘Engineer’ are values of the field ‘Profession’ of the two gentlemen respectively.

The naming needs to happen as I save the tiddler.

Can this be done? How?

One way would be to have a tiddler showing a “form” that you fill out with the content and then click “OK” to create the new tiddler. Would that be OK or do you require that your described procedure is how tiddlers are created by default?

Is it true you are asking to rename the tiddler? Or are you talking about “a new tiddler here”.

You have to

  • create a tiddler before you rename it a whole temp tiddler,
  • OR store the critical details in temporary fields before you create the tiddler with the name
  • Rename an existing tiddler

On whose event calendar is this appearing?

My personal educated preferences that may help you;

Personally I advise against storing multiple values in a heading, values you may need to change, and as the key to the tiddler, this adds complexity. Have you considered setting the caption and ensuring your lists display the caption first if available?

Since this is related to contacts and times I would consider using one of these to create an initial tiddler eg scheduled date, then as you add participants provide a button (via view Template) to rename the tiddler by appending participants to the caption (if you must title). If appending use the listops filter and actions to treat the actual caption/title like a list field.

I would personally would not rename tiddlers as you propose but create an event tiddler and craft this custom title to appear in a list of upcoming events (on the fly) and nowhere else.

Regards Tones

Filling out a form to create new tiddler would be fine. And may be, I can provide access to this ‘form’ from the sidebar to make it easily accessible.

But that would not let me edit the tiddler once created. See my reply to Tones comments.

So, I guess, we will go with renaming the tiddler as we hit the save button.

The workflow I had in my mind was:

Create a tiddler. Leave the title as it is.

Assign ‘Remote’ to location.

Assign relevant values to ‘reference’ and ‘scheduled’.

Enter all the details in the text.

Hit ‘Ctrl+Enter’ to save the tiddler.

That is when it will pick up the relevant details and name the tiddler appropriately.

Later, if I edit the tiddler and change either ‘reference’ or ‘scheduled’, the tiddler would be renamed.

As you can see, there are no calendars, etc. But this is indeed about contacts and times.

I could start with a tiddler whose title is only the date. But if there are multiple entries for the same date, it would create a problem. The naming convention I am proposing would always be unique in my use case.

I, however, get your point about titles that depend on some other fields and will keep that in mind.

OK, so the fundamental problem here is that the name of the tiddler is also its identity so, in a sense, you can’t rename a tiddler. What is done is instead to create a new one with the new name and copy over the content and delete the old one.

Another approach you may want to consider is to keep the title for the tiddler and, instead merely “show” the special “title” that you describe. E.g you could have a small viewtemplate above the title viewtemplate that simply transcludes the various values you describe. This would (probably) mean that the titles you see in e.g the sidebar is the actual tiddler title, but when you open the tiddler you’d see your special stuff at top of tiddler. It is simple to make such a viewtemplate and to have it only show up for special tiddlers. You could also hide the regular title for the tiddlers that show your special construct.

Another approach to also “fake” titles, is a css trick I use seen here. It has its limitations and I’m not sure about your more complex use case for it. This would require that you use the “titles as links” setting because it adds text to links, which also shows up in e.g the sidebar lists (as seen in the demo).

If you follow the same workflow, but you accept all the values into a temporary tiddler, then on click create the new tiddler as desired is the same interaction but a different way of implementing it.