[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread Darth Mole
Hello and thank you very much! I'll take a look and provide any feedback I 
can.

It seems my biggest issue is not having examples that allow me to confirm 
what I'm thinking with what I read. Or at least not having them where I 
think they should be based on where I'm looking inside TiddlyWiki.

IE:

When trying to find the define solution for the toc code above I searched 
the following Tiddlers for a matching example.

https://tiddlywiki.com/#ButtonWidget
https://tiddlywiki.com/#Variables
https://tiddlywiki.com/#Variables%20in%20WikiText
https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText
https://tiddlywiki.com/#Macros%20in%20WikiText
https://tiddlywiki.com/#Macro%20Calls%20in%20WikiText
https://tiddlywiki.com/#Macro%20Calls%20in%20WikiText%20(Examples)
https://tiddlywiki.com/#dumpvariables%20Macro
https://tiddlywiki.com/#dumpvariables%20Macro%20(Examples)
https://tiddlywiki.com/#variables%20Operator
https://tiddlywiki.com/#variables%20Operator%20(Examples)

Now, after receiving the help from earlier, when I went back and looked at 
the tiddlers in question I noticed this:

\define dumpvariables()

<$list filter="[variables[]]" variable="varname">

<$text text=<>/>:
<$codeblock code={{{ [getvariable[]] }}}/>



\end

and also 

Several of the examples 
on https://tiddlywiki.com/#Macro%20Definitions%20in%20WikiText that also 
nearly match the code provided above in the replies. 

However, for some reason (probably on my side of things) the above example 
and

\define sayhi(name:"Bugs Bunny" address:"Rabbit Hole Hill")
 Hi, I'm $name$ and I live in $address$. 
\end

Didn't seem to be the same to me. In fact, the only reason I was able to 
finally figure out the following was because I knew it should work like the 
code given so it was just a matter of process of elimination. Until a few 
minutes ago, and only because I knew the example worked, as well as the 
code given above for me to consider, was I finally able to see where they 
got "Bugs" from i the output.

\define say-hi-using-variables() 
Hi, I'm $(name)$ and I live in $(address)$. 
\end 

 \define name() Bugs

<$set name="address" value="Rabbit Hole Hill"> 
<>
 

Hi, I'm Bugs and I live in Rabbit Hole Hill.

Long story short, I may just represent an outlier scenario and if that is 
the case I apologize in advance for any easy questions. Of course, I will 
still read over everything and will be sure to ask questions!
On Wednesday, June 9, 2021 at 7:02:00 PM UTC-4 TW Tones wrote:

> iamdar,
>
> Here is a link to some documentation that may help you more generally at 
> this phase of your learing, 
> https://anthonymuscio.github.io/#Standard%20Nomenclature
>
> Its an updated version of something published by Tobias in the past. In 
> particular look at the foot notes about values in parameters widget and 
> HTML, it shows why any "concatenation" to make compound values needs to be 
> done, as ewrioc says the best way without making custom macros and 
> wikifying them is to use the filtered transclusions.  With these you use a 
> filter inside triple curly braces to generate the value (no need for an 
> intermediate variable) and filters permit variables, transclusions and 
> field content to be concatinated.
>
> Also, As someone in the learning phase please do feedback if you need 
> something clarified or added to my document as you have the insight to what 
> is needed during the learning process, unfortunately I now know too much. 
> You can help other that pass this way in the future.
>
> Regards
> Tones
>
>
>
>
> On Thursday, 10 June 2021 at 04:37:15 UTC+10 iamdar...@gmail.com wrote:
>
>> Thank you so much Eric! Really thank you so much! I'm a little happy to 
>> see I was kind of heading in the right direction at one point earlier, 
>> except I put the \end of the tocscript define below the  because 
>> I was afraid it wouldn't include itself in the button code and it broke it 
>> lol. Also thank you very much for providing the explanations as well! 
>>
>> The !!storyname was actually left over from the step before this one. I 
>> hadn't considered having a dynamic toc at first. Though now I'll use it in 
>> the tocscript to help identify the page a bit better. Thank you for looking 
>> that closely at the script!
>>
>>
>>
>> On Wednesday, June 9, 2021 at 2:05:23 PM UTC-4 Eric Shulman wrote:
>>
>>> On Wednesday, June 9, 2021 at 9:53:36 AM UTC-7 iamdar...@gmail.com 
>>> wrote:
>>>
 I can't figure out how to:

>>> 1) Make the toc div text a variable, named tocscript, to call it in the 
 script like the fields, so I can add it to the new tiddler being created.

>>>
>>> Move the toc div text into a macro named "tocscript".  Macros are 
>>> essentially variables that can accept parameters.
>>>
>>> 2) Update the tag name in the toc-selective-expandable macro before it 
 is added to the new tiddler being created.

>>>
>>> Within a macro, there are two forms of syntax that are automatically 
>>> replaced when the macro 

[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread TW Tones
iamdar,

Here is a link to some documentation that may help you more generally at 
this phase of your 
learing, https://anthonymuscio.github.io/#Standard%20Nomenclature

Its an updated version of something published by Tobias in the past. In 
particular look at the foot notes about values in parameters widget and 
HTML, it shows why any "concatenation" to make compound values needs to be 
done, as ewrioc says the best way without making custom macros and 
wikifying them is to use the filtered transclusions.  With these you use a 
filter inside triple curly braces to generate the value (no need for an 
intermediate variable) and filters permit variables, transclusions and 
field content to be concatinated.

Also, As someone in the learning phase please do feedback if you need 
something clarified or added to my document as you have the insight to what 
is needed during the learning process, unfortunately I now know too much. 
You can help other that pass this way in the future.

Regards
Tones




On Thursday, 10 June 2021 at 04:37:15 UTC+10 iamdar...@gmail.com wrote:

> Thank you so much Eric! Really thank you so much! I'm a little happy to 
> see I was kind of heading in the right direction at one point earlier, 
> except I put the \end of the tocscript define below the  because 
> I was afraid it wouldn't include itself in the button code and it broke it 
> lol. Also thank you very much for providing the explanations as well! 
>
> The !!storyname was actually left over from the step before this one. I 
> hadn't considered having a dynamic toc at first. Though now I'll use it in 
> the tocscript to help identify the page a bit better. Thank you for looking 
> that closely at the script!
>
>
>
> On Wednesday, June 9, 2021 at 2:05:23 PM UTC-4 Eric Shulman wrote:
>
>> On Wednesday, June 9, 2021 at 9:53:36 AM UTC-7 iamdar...@gmail.com wrote:
>>
>>> I can't figure out how to:
>>>
>> 1) Make the toc div text a variable, named tocscript, to call it in the 
>>> script like the fields, so I can add it to the new tiddler being created.
>>>
>>
>> Move the toc div text into a macro named "tocscript".  Macros are 
>> essentially variables that can accept parameters.
>>
>> 2) Update the tag name in the toc-selective-expandable macro before it is 
>>> added to the new tiddler being created.
>>>
>>
>> Within a macro, there are two forms of syntax that are automatically 
>> replaced when the macro is processed:
>> * instances of $paramname$ are replaced by corresponding values that are 
>> passed to the macro as parameters
>> * instances of $(varname)$ are replaced by corresponding values that are 
>> defined in variables before the macro is invoked
>>
>> Thus, for your purposes:
>> \define temp() $:/temp/input/$(currentTiddler)$
>>
>> \define tocscript()
>> 
>> <>
>> 
>> \end
>>
>> |  Story Name:|<$edit-text tiddler=<> field="storyname"/>|
>> |   Story Abbreviation:|<$edit-text tiddler=<> 
>> field="storyabbrev"/>  |
>>
>> <$tiddler tiddler=<>>
>> <$button> Create Story
>><$vars storyabbrev={{!!storyabbrev}}>
>><$action-setfield $tiddler={{!!storyabbrev}} text=<> 
>> tags="Stories" />
>><$action-setfield $tiddler={{{ [{!!storyabbrev}addsuffix[ Chapter 
>> 001]] }}} tags={{!!storyabbrev}} />
>><$action-deletetiddler tiddler=<> />
>>
>> 
>> 
>>  
>> Notes:
>> * The $vars widget fetches the !!storyabbrev input value to turn it into 
>> a variable named "storyabbrev", so that it can then be automatically 
>> replaced in the tocscript macro
>> * I don't see anywhere that you actually use the "!!storyname" input value
>>
>> enjoy,
>> -e
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/9e962e71-ddc1-4009-94df-854713fcb092n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread Darth Mole
Thank you so much Eric! Really thank you so much! I'm a little happy to see 
I was kind of heading in the right direction at one point earlier, except I 
put the \end of the tocscript define below the  because I was 
afraid it wouldn't include itself in the button code and it broke it lol. 
Also thank you very much for providing the explanations as well! 

The !!storyname was actually left over from the step before this one. I 
hadn't considered having a dynamic toc at first. Though now I'll use it in 
the tocscript to help identify the page a bit better. Thank you for looking 
that closely at the script!



On Wednesday, June 9, 2021 at 2:05:23 PM UTC-4 Eric Shulman wrote:

> On Wednesday, June 9, 2021 at 9:53:36 AM UTC-7 iamdar...@gmail.com wrote:
>
>> I can't figure out how to:
>>
> 1) Make the toc div text a variable, named tocscript, to call it in the 
>> script like the fields, so I can add it to the new tiddler being created.
>>
>
> Move the toc div text into a macro named "tocscript".  Macros are 
> essentially variables that can accept parameters.
>
> 2) Update the tag name in the toc-selective-expandable macro before it is 
>> added to the new tiddler being created.
>>
>
> Within a macro, there are two forms of syntax that are automatically 
> replaced when the macro is processed:
> * instances of $paramname$ are replaced by corresponding values that are 
> passed to the macro as parameters
> * instances of $(varname)$ are replaced by corresponding values that are 
> defined in variables before the macro is invoked
>
> Thus, for your purposes:
> \define temp() $:/temp/input/$(currentTiddler)$
>
> \define tocscript()
> 
> <>
> 
> \end
>
> |  Story Name:|<$edit-text tiddler=<> field="storyname"/>|
> |   Story Abbreviation:|<$edit-text tiddler=<> 
> field="storyabbrev"/>  |
>
> <$tiddler tiddler=<>>
> <$button> Create Story
><$vars storyabbrev={{!!storyabbrev}}>
><$action-setfield $tiddler={{!!storyabbrev}} text=<> 
> tags="Stories" />
><$action-setfield $tiddler={{{ [{!!storyabbrev}addsuffix[ Chapter 001]] 
> }}} tags={{!!storyabbrev}} />
><$action-deletetiddler tiddler=<> />
>
> 
> 
>  
> Notes:
> * The $vars widget fetches the !!storyabbrev input value to turn it into a 
> variable named "storyabbrev", so that it can then be automatically replaced 
> in the tocscript macro
> * I don't see anywhere that you actually use the "!!storyname" input value
>
> enjoy,
> -e
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/a7dccc35-3aa2-49a3-b328-642d5ec92e5bn%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread Eric Shulman
On Wednesday, June 9, 2021 at 9:53:36 AM UTC-7 iamdar...@gmail.com wrote:

> I can't figure out how to:
> 1) Make the toc div text a variable, named tocscript, to call it in the 
> script like the fields, so I can add it to the new tiddler being created.
>

Move the toc div text into a macro named "tocscript".  Macros are 
essentially variables that can accept parameters.

2) Update the tag name in the toc-selective-expandable macro before it is 
> added to the new tiddler being created.
>

Within a macro, there are two forms of syntax that are automatically 
replaced when the macro is processed:
* instances of $paramname$ are replaced by corresponding values that are 
passed to the macro as parameters
* instances of $(varname)$ are replaced by corresponding values that are 
defined in variables before the macro is invoked

Thus, for your purposes:
\define temp() $:/temp/input/$(currentTiddler)$

\define tocscript()

<>

\end

|  Story Name:|<$edit-text tiddler=<> field="storyname"/>|
|   Story Abbreviation:|<$edit-text tiddler=<> field="storyabbrev"/>  
|

<$tiddler tiddler=<>>
<$button> Create Story
   <$vars storyabbrev={{!!storyabbrev}}>
   <$action-setfield $tiddler={{!!storyabbrev}} text=<> 
tags="Stories" />
   <$action-setfield $tiddler={{{ [{!!storyabbrev}addsuffix[ Chapter 001]] 
}}} tags={{!!storyabbrev}} />
   <$action-deletetiddler tiddler=<> />
   


 
Notes:
* The $vars widget fetches the !!storyabbrev input value to turn it into a 
variable named "storyabbrev", so that it can then be automatically replaced 
in the tocscript macro
* I don't see anywhere that you actually use the "!!storyname" input value

enjoy,
-e

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/5a0abe47-7b1f-47cc-ac18-83fb3b400a66n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread Darth Mole
Thank you very much! It worked like a charm! 

I'm also really sorry to ask yet another question but for some reason the 
solution isn't clicking just yet. I've been searching all morning trying to 
find the right combination/solution and while I have made a little progress 
I think I'm mixing too many functions together. The below code is slightly 
modified from the original one above due to having a different but related 
purpose.

 \define temp() $:/temp/input/$(currentTiddler)$

|  Story Name:|<$edit-text tiddler=<> field="storyname"/>|
|   Story Abbreviation:|<$edit-text tiddler=<> field="storyabbrev"/>  
|

<$tiddler tiddler=<>>
<$button> Create Story
   <$action-setfield $tiddler={{!!storyabbrev}} text={{!!tocscript}} 
tags=Stories 
/>
   <$action-setfield $tiddler={{{ [{!!storyabbrev}addsuffix[ Chapter 001]] 
}}} tags={{!!storyabbrev}} />
   <$action-deletetiddler tiddler=<> />





<>



I can't figure out how to:

1) Make the toc div text a variable, named toscript, to call it in the 
script like the fields, so I can add it to the new tiddler being created.
2) Update the tag name in the toc-selective-expandable macro before it is 
added to the new tiddler being created.

Every time I try to use /define or $set I either break the existing code or 
<> {{!!tocscript}} $tocscript$ (can't figure out which one, if 
any, to use) doesn't "activate"

I was also thinking of trying to use an existing tiddler to act as the 
template for the toc div text but I ran into issues with that as well.

Thanks again and once again my apologies if these are simple questions.

On Wednesday, June 9, 2021 at 2:37:26 AM UTC-4 Eric Shulman wrote:

> On Tuesday, June 8, 2021 at 10:49:07 PM UTC-7 iamdar...@gmail.com wrote:
>
>> If I wanted to add/append some static text to the end of the target field 
>> value, how would I do so?
>>
>
> Using filtered transclusion:
> <$action-setfield $tiddler={{{ [{!!target}addsuffix[ Chapter 01]] }}} etc.
>
> if you want, you could add the suffix to the input table:
> | Target suffix:|<$edit-text tiddler=<> field="suffix"/>   |
>
> and then you would use:
> <$action-setfield $tiddler={{{ [{!!target}addsuffix{!!suffix}] }}} etc.
>
> enjoy,
> -e
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/61f07ce2-3d73-47c2-bae2-fe68d940b6c6n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-09 Thread Eric Shulman
On Tuesday, June 8, 2021 at 10:49:07 PM UTC-7 iamdar...@gmail.com wrote:

> If I wanted to add/append some static text to the end of the target field 
> value, how would I do so?
>

Using filtered transclusion:
<$action-setfield $tiddler={{{ [{!!target}addsuffix[ Chapter 01]] }}} etc.

if you want, you could add the suffix to the input table:
| Target suffix:|<$edit-text tiddler=<> field="suffix"/>   |

and then you would use:
<$action-setfield $tiddler={{{ [{!!target}addsuffix{!!suffix}] }}} etc.

enjoy,
-e

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/79fedf9c-0482-4502-beaf-9764334c4e91n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Darth Mole
Hello and thank you very much for providing another solution! I very much 
appreciate the answers and also the information provided!

As a quick follow-up question:

For both methods: 

<$action-setfield $tiddler=<>
<$action-setfield $tiddler={{!!target}}

If I wanted to add/append some static text to the end of the target field 
value, how would I do so? I have tried various ways, using + or enclosing 
the variable and text in " or brackets but can't seem to find the 
combination.

For an idea:

Target = HTVW

<$action-setfield $tiddler=[<> Chapter 01] would produce a 
Tiddler with the title of HTVW Chapter 01
<$action-setfield $tiddler={{{!!target}}+ Chapter 01} would produce a 
Tiddler with the title of HTVW Chapter 01

Thank you again for your help and any additional information/solutions you 
can provide!


On Wednesday, June 9, 2021 at 1:09:25 AM UTC-4 Eric Shulman wrote:

> On Tuesday, June 8, 2021 at 8:21:19 PM UTC-7 cj.v...@gmail.com wrote:
>
>> There are often many different ways of doing things, and I just went 
>> ahead with the fastest solution I could think of...
>>
>
> Here's a much more compact way to write the same functionality:
> \define temp() $:/temp/input/$(currentTiddler)$
>
> |  Label:|<$edit-text tiddler=<> field="label"/>|
> |   From Tag:|<$edit-text tiddler=<> field="fromtag"/>  |
> | Target:|<$edit-text tiddler=<> field="target"/>   |
> | Target Tag:|<$edit-text tiddler=<> field="targettag"/>|
>
> <$tiddler tiddler=<>>
> <$button> <$view field="label">join tiddlers 
><$action-setfield $tiddler={{!!target}} text={{{ 
> [tag{!!fromtag}get[text]join[]] }}} tags={{!!targettag}} />
><$action-deletetiddler tiddler=<> />
> 
> 
>
> Notes:
> 1) the inputs are stored in a $:/temp tiddler, so it doesn't clutter up 
> the visible list of tiddlers
> 2) the temp tiddler's title is assembled using a simple \define, rather 
> than using $vars with filtered transclusion syntax
> 3) the input form uses simple wikitext table syntax instead of HTML syntax 
> to produce more readable code
> 4) the $edit-text widgets target <> rather than the more verbose, 
> but equivalent, {{{ [] }}}
> 5) the $button is enclosed in a $tiddler widget so that references to the 
> input field values can use {{!!fieldname}}
> 6) the $button uses <$view>... to provide a default label if none 
> is input
> 7) instead of using $wikify, the output text is constructed using filtered 
> transclusion syntax to join the source tiddler content into a single string
> 8) the $:/temp tiddler is deleted after processing the $button press to 
> clear all the form inputs for re-use
>
> enjoy,
> -e
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/85a2d028-81ee-47cb-b5e5-388910f36bc9n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Eric Shulman
On Tuesday, June 8, 2021 at 8:21:19 PM UTC-7 cj.v...@gmail.com wrote:

> There are often many different ways of doing things, and I just went ahead 
> with the fastest solution I could think of...
>

Here's a much more compact way to write the same functionality:
\define temp() $:/temp/input/$(currentTiddler)$

|  Label:|<$edit-text tiddler=<> field="label"/>|
|   From Tag:|<$edit-text tiddler=<> field="fromtag"/>  |
| Target:|<$edit-text tiddler=<> field="target"/>   |
| Target Tag:|<$edit-text tiddler=<> field="targettag"/>|

<$tiddler tiddler=<>>
<$button> <$view field="label">join tiddlers 
   <$action-setfield $tiddler={{!!target}} text={{{ 
[tag{!!fromtag}get[text]join[]] }}} tags={{!!targettag}} />
   <$action-deletetiddler tiddler=<> />



Notes:
1) the inputs are stored in a $:/temp tiddler, so it doesn't clutter up the 
visible list of tiddlers
2) the temp tiddler's title is assembled using a simple \define, rather 
than using $vars with filtered transclusion syntax
3) the input form uses simple wikitext table syntax instead of HTML syntax 
to produce more readable code
4) the $edit-text widgets target <> rather than the more verbose, but 
equivalent, {{{ [] }}}
5) the $button is enclosed in a $tiddler widget so that references to the 
input field values can use {{!!fieldname}}
6) the $button uses <$view>... to provide a default label if none 
is input
7) instead of using $wikify, the output text is constructed using filtered 
transclusion syntax to join the source tiddler content into a single string
8) the $:/temp tiddler is deleted after processing the $button press to 
clear all the form inputs for re-use

enjoy,
-e

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/218d0f02-a4f4-4deb-b259-60e4767b1460n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Charlie Veniot
Hey, my pleasure.  Although I'm often too deeply immersed in my own 
projects, I do find it hard to pass up quick and fun "programming" 
opportunities.

If ever you need to tweak that somehow, just post right back into this 
thread.

There are often many different ways of doing things, and I just went ahead 
with the fastest solution I could think of.  Well, I did roll up my sleeves 
a smidgen to make it look kind of pretty with some HTML.  Although I'm more 
into practical than pretty, ain't nothing wrong with pretty.  Well, the 
rendering is kind of pretty.  The HTML, maybe not so much ...

Rock'n roll !

On Tuesday, June 8, 2021 at 11:52:43 PM UTC-3 iamdar...@gmail.com wrote:

> You are awesome! Thank you very much! It works just great! Thank you, 
> thank you, thank you, thank you!
>
> On Tuesday, June 8, 2021 at 10:39:55 PM UTC-4 cj.v...@gmail.com wrote:
>
>> I can't really properly test this, but maybe this does the trick?
>>
>> <$vars dataTiddler={{{ [addsuffix[ Data]] }}}>
>>
>> 
>> Whatever description needs to be put here:
>>
>> 
>> Label:
>>  <$edit-text tiddler={{{ [] }}} field="my_label"/> 
>> 
>> Tag:
>>  <$edit-text tiddler={{{ [] }}} field="my_tag"/> 
>> 
>> Target:
>>  <$edit-text tiddler={{{ [] }}} field="my_target"/> 
>> 
>> Targetting:
>>  <$edit-text tiddler={{{ [] }}} field="my_targetting"/> 
>> 
>> 
>>
>> <$vars myLabel={{{ [get[my_label]] }}}
>>   myTag={{{ [get[my_tag]] }}}
>>   myTarget={{{ [get[my_target]] }}}
>>   myTargetting={{{ [get[my_targetting]] }}}>
>> <$button> Create <>
>><$wikify name="out" text="""<$list filter="[tag]"><$text 
>> text={{!!text}}/>""">
>>   <$action-setfield $tiddler=<> text=<> 
>> tags=<> />
>>
>> 
>> 
>>
>>   
>>
>> 
>>
>> On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:
>>
>>> Hello,
>>>
>>> I hope I didn't miss a clear answer for this but is there anyway to 
>>> prompt the user for a variable, with an input field, after a button press?
>>>
>>> I found the below code to combine multiple tiddlers into one based on a 
>>> shared tag, and then modified it to add a tag.
>>>
>>> \define join(label,tag,target,targettag)
>>> <$button> $label$
>>><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
>>> text={{!!text}}/>""">
>>>   <$action-setfield $tiddler="$target$" text=<> 
>>> tags=<> />
>>>
>>> 
>>> \end
>>>
>>> <>
>>>
>>> As of now the variables for the button are set by the <>> which has to be manually set.
>>>
>>> My question/hope is if there is a way to prompt the user to input the 
>>> variables, one at a time, via an input box/field/prompt, that would allow 
>>> them to set the variables each time the button is pressed.
>>>
>>> Thank you!
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/13a7f3cb-c97f-4d3f-9904-47c43e5c0cc6n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Darth Mole
You are awesome! Thank you very much! It works just great! Thank you, thank 
you, thank you, thank you!

On Tuesday, June 8, 2021 at 10:39:55 PM UTC-4 cj.v...@gmail.com wrote:

> I can't really properly test this, but maybe this does the trick?
>
> <$vars dataTiddler={{{ [addsuffix[ Data]] }}}>
>
> 
> Whatever description needs to be put here:
>
> 
> Label:
>  <$edit-text tiddler={{{ [] }}} field="my_label"/> 
> 
> Tag:
>  <$edit-text tiddler={{{ [] }}} field="my_tag"/> 
> 
> Target:
>  <$edit-text tiddler={{{ [] }}} field="my_target"/> 
> 
> Targetting:
>  <$edit-text tiddler={{{ [] }}} field="my_targetting"/> 
> 
> 
>
> <$vars myLabel={{{ [get[my_label]] }}}
>   myTag={{{ [get[my_tag]] }}}
>   myTarget={{{ [get[my_target]] }}}
>   myTargetting={{{ [get[my_targetting]] }}}>
> <$button> Create <>
><$wikify name="out" text="""<$list filter="[tag]"><$text 
> text={{!!text}}/>""">
>   <$action-setfield $tiddler=<> text=<> 
> tags=<> />
>
> 
> 
>
>   
>
> 
>
> On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:
>
>> Hello,
>>
>> I hope I didn't miss a clear answer for this but is there anyway to 
>> prompt the user for a variable, with an input field, after a button press?
>>
>> I found the below code to combine multiple tiddlers into one based on a 
>> shared tag, and then modified it to add a tag.
>>
>> \define join(label,tag,target,targettag)
>> <$button> $label$
>><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
>> text={{!!text}}/>""">
>>   <$action-setfield $tiddler="$target$" text=<> 
>> tags=<> />
>>
>> 
>> \end
>>
>> <>
>>
>> As of now the variables for the button are set by the <> which has to be manually set.
>>
>> My question/hope is if there is a way to prompt the user to input the 
>> variables, one at a time, via an input box/field/prompt, that would allow 
>> them to set the variables each time the button is pressed.
>>
>> Thank you!
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/055455d0-5dd3-4253-93c1-e43ae3cf104cn%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Charlie Veniot
I can't really properly test this, but maybe this does the trick?

<$vars dataTiddler={{{ [addsuffix[ Data]] }}}>


Whatever description needs to be put here:


Label:
 <$edit-text tiddler={{{ [] }}} field="my_label"/> 

Tag:
 <$edit-text tiddler={{{ [] }}} field="my_tag"/> 
Target:
 <$edit-text tiddler={{{ [] }}} field="my_target"/> 

Targetting:
 <$edit-text tiddler={{{ [] }}} field="my_targetting"/> 



<$vars myLabel={{{ [get[my_label]] }}}
  myTag={{{ [get[my_tag]] }}}
  myTarget={{{ [get[my_target]] }}}
  myTargetting={{{ [get[my_targetting]] }}}>
<$button> Create <>
   <$wikify name="out" text="""<$list filter="[tag]"><$text 
text={{!!text}}/>""">
  <$action-setfield $tiddler=<> text=<> 
tags=<> />
   



  



On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:

> Hello,
>
> I hope I didn't miss a clear answer for this but is there anyway to prompt 
> the user for a variable, with an input field, after a button press?
>
> I found the below code to combine multiple tiddlers into one based on a 
> shared tag, and then modified it to add a tag.
>
> \define join(label,tag,target,targettag)
> <$button> $label$
><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
> text={{!!text}}/>""">
>   <$action-setfield $tiddler="$target$" text=<> 
> tags=<> />
>
> 
> \end
>
> <>
>
> As of now the variables for the button are set by the < which has to be manually set.
>
> My question/hope is if there is a way to prompt the user to input the 
> variables, one at a time, via an input box/field/prompt, that would allow 
> them to set the variables each time the button is pressed.
>
> Thank you!
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/95e94e2c-4ab4-46e2-8469-e5ab5518aecan%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Charlie Veniot
Snippet of alternative code heading over in about 15 minutes !

On Tuesday, June 8, 2021 at 11:26:15 PM UTC-3 iamdar...@gmail.com wrote:

> Nope, not opposed to it. Just trying to simplify/automate the process of 
> combining individual tiddlers instead of manually editing the Tiddler each 
> time.
>
> The flow isn't set in stone!
>
> On Tuesday, June 8, 2021 at 10:15:31 PM UTC-4 cj.v...@gmail.com wrote:
>
>> Instead of press buttons, then prompt user for variable values via 
>> fields, would you be open to a flow change, i.e.:
>>
>>
>>1. Prompt user for values via fields
>>2. Press button?
>>
>>
>> On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:
>>
>>> Hello,
>>>
>>> I hope I didn't miss a clear answer for this but is there anyway to 
>>> prompt the user for a variable, with an input field, after a button press?
>>>
>>> I found the below code to combine multiple tiddlers into one based on a 
>>> shared tag, and then modified it to add a tag.
>>>
>>> \define join(label,tag,target,targettag)
>>> <$button> $label$
>>><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
>>> text={{!!text}}/>""">
>>>   <$action-setfield $tiddler="$target$" text=<> 
>>> tags=<> />
>>>
>>> 
>>> \end
>>>
>>> <>
>>>
>>> As of now the variables for the button are set by the <>> which has to be manually set.
>>>
>>> My question/hope is if there is a way to prompt the user to input the 
>>> variables, one at a time, via an input box/field/prompt, that would allow 
>>> them to set the variables each time the button is pressed.
>>>
>>> Thank you!
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/db5a5832-41ff-4bc6-9419-50de7682351fn%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Darth Mole
Nope, not opposed to it. Just trying to simplify/automate the process of 
combining individual tiddlers instead of manually editing the Tiddler each 
time.

The flow isn't set in stone!

On Tuesday, June 8, 2021 at 10:15:31 PM UTC-4 cj.v...@gmail.com wrote:

> Instead of press buttons, then prompt user for variable values via fields, 
> would you be open to a flow change, i.e.:
>
>
>1. Prompt user for values via fields
>2. Press button?
>
>
> On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:
>
>> Hello,
>>
>> I hope I didn't miss a clear answer for this but is there anyway to 
>> prompt the user for a variable, with an input field, after a button press?
>>
>> I found the below code to combine multiple tiddlers into one based on a 
>> shared tag, and then modified it to add a tag.
>>
>> \define join(label,tag,target,targettag)
>> <$button> $label$
>><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
>> text={{!!text}}/>""">
>>   <$action-setfield $tiddler="$target$" text=<> 
>> tags=<> />
>>
>> 
>> \end
>>
>> <>
>>
>> As of now the variables for the button are set by the <> which has to be manually set.
>>
>> My question/hope is if there is a way to prompt the user to input the 
>> variables, one at a time, via an input box/field/prompt, that would allow 
>> them to set the variables each time the button is pressed.
>>
>> Thank you!
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2bc1c6c7-9b87-449a-9505-9199f014d672n%40googlegroups.com.


[tw5] Re: Input Prompts to Provide Variables With Button?

2021-06-08 Thread Charlie Veniot
Instead of press buttons, then prompt user for variable values via fields, 
would you be open to a flow change, i.e.:


   1. Prompt user for values via fields
   2. Press button?


On Tuesday, June 8, 2021 at 10:42:53 PM UTC-3 iamdar...@gmail.com wrote:

> Hello,
>
> I hope I didn't miss a clear answer for this but is there anyway to prompt 
> the user for a variable, with an input field, after a button press?
>
> I found the below code to combine multiple tiddlers into one based on a 
> shared tag, and then modified it to add a tag.
>
> \define join(label,tag,target,targettag)
> <$button> $label$
><$wikify name="out" text="""<$list filter="[tag[$tag$]]"><$text 
> text={{!!text}}/>""">
>   <$action-setfield $tiddler="$target$" text=<> 
> tags=<> />
>
> 
> \end
>
> <>
>
> As of now the variables for the button are set by the < which has to be manually set.
>
> My question/hope is if there is a way to prompt the user to input the 
> variables, one at a time, via an input box/field/prompt, that would allow 
> them to set the variables each time the button is pressed.
>
> Thank you!
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b2a2b658-573b-482a-9d90-173e1b88e073n%40googlegroups.com.