I'm able to do this at all thanks to Tobias Beer's really easy to use 
"Random" plugin. http://tobibeer.github.io/tw5-plugins/#random

 
<!-- Generating a random corp -->

<!-- Generate the First Name from tiddlers starting with GenSource: that 
also have the tags "Corp" and "FirstName" and use the "corpname" field as 
the value -->
<$set name="FirstName" 
filter="[prefix[GenSource:]tag[Corp]tag[FirstName]field[corpname]random[]]">

<!-- Generate the Last Name from tiddlers starting with GenSource: that 
also have the tags "Corp" and "LastName" and use the "corpname" field as 
the value -->
<$set name="LastName" 
filter="[prefix[GenSource:]tag[Corp]tag[LastName]field[corpname]random[]]">

<!-- Preview the Generate Corp -->
<table>
<tr><th>Name </th> <td><<FirstName>></td></tr>
</table>

<!-- Create New Tiddler with the generated information prefilled -->
<$button>Generate Corp
<$action-sendmessage $message="tm-new-tiddler" title="Corp:"<<FirstName>> 
tags="Corp Corp:<<FirstName>>-<<LastName>>"/>
</$button>
</$set>

This is my current batch of code, I've got it partially working but am 
stumped on a few things:

1) If I remove the field[corpname] I'm able to successfully pull the titles 
of the GenSource: tiddler(s), however with it, I get null as a result, I've 
made absolutely sure that I've made no spelling mistakes and the GenSource 
tiddler does indeed have that field, am I specifying this wrong?

2) How do I properly insert tags using the variables, they're considered 
literal inside the quotes, and ignored outside of them.

3) Am I going about this in an absurd manner?

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/5f004e9c-ea6a-4793-9b2a-97bb04822936%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to