[tw] How to concatenate < and a tiddler field value for use as a new tiddler title

2018-02-22 Thread Michael Wiktowy
Look up <$wikify>. It is like <$set> but it renders/evaluates the value to the 
variable rather than just storing it for further rendering in another context 
(or not rendering like in one of your cases). So you get to choose where the 
value gets set in stone. I had a similar issue recently and that is how I got 
around it.

/Mike

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/527d8f0c-9668-4056-b6b9-ef90ce72188e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw] How to concatenate < and a tiddler field value for use as a new tiddler title

2018-02-21 Thread markhylton2
I've two things I want to do:

1) I want to use the current date/time as part of a concatenated string for 
a new tiddler title.
2) I want to use the value of a field from the host tiddler as part of a 
concatentated string for a new tiddler title.
3) I want to use 1) and 2) at the same time for the same new tiddler.

E.g.:

A host tiddler has a field "projectnumber" and that tiddler also hosts a 
transcluded tiddler "newProjectEntry". "newProjectEntry" holds <$button>
code to create a new tiddler. Clicking the newProjectEntry button from the 
host tiddler is intended to generate a new tiddler with a title "2018-02-01 
09:57:04, 12345, Project entry:" where:

   1. "2018-02-01 09:57:04" is the value from <> when the button 
   is clicked.
  1. Issue 1: I can get a date/time string, but it is the date/time AT 
  THE TIME that tiddler "newProjectEntry" is rendered in the host tiddler, 
  not at the time the button was pressed.
  2. Issue 2: Otherwise, I get the text string "<>" instead of 
  the rendered version for <>.
  3. Issue 3. Or otherwise, I get the proper date/time, but am unable 
  to concatenate a looked-up project number.
   2. "12345" is the value of host tiddler's projectnumber field.
  1. Issue 1: I can get the host tidder's title ("<>"), 
  but the construct "<>" doesn't seem to work.
   3. "Project entry:" (and the other spaces and commas) are text literals.
  1. No issues here. I've mostly had sufficient guidance on how to 
  concatenate things. So far. I think.
   

What I've written:

Tiddler 1 fields:

> Title:hostTiddler
> projectnumber:12345
> Text:{{newProjectEntryPB}}
>

Tiddler 2 fields:

> Title:newProjectEntryPB
> Text:\define projecttitle() $(todaynow)$, $(projectnum)$, Project entry:
>
> <$set name="todaynow" value=<>>
> <$set name="projectnum" value={{<>}}>
>
> Need a new project entry? Click this button and a project tiddler will be 
> created:
> <$button>
>   New project entry
>   <$action-sendmessage
>  $message="tm-new-tiddler"
>  title=<>
>   />
> 
>
> 
>

When the button is clicked from within hostTiddler, it generates a new 
tiddler with the title:
2018-02-21 18:36:34, , Project entry:

1) Issue: The date/time is not current with the button press.
2) Issue: Unable to get the project number value from the host tiddler.

Thanks much for your help!

Mark Hylton

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/c93fd420-8fd0-4c20-a968-12ed3dc0ec23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.