How to access tiddlerdataplugin data from another tiddler without FET

42 views
Skip to first unread message

Dave Gifford - http://www.giffmex.org/

unread,
Aug 23, 2010, 12:58:04 PM8/23/10
to TiddlyWiki
Hi guys

I am sure this is simple, but, if I wanted a 'display' tiddler that
accessed the data from a form field or drop down list in a data entry
tiddler, what would I do?

I am guessing something like <<tiddler 'dataentrythingy'
'tiddler.data("nameofformfield")'>>

How would I write something like that correctly?

Dave

Dave Gifford - http://www.giffmex.org/

unread,
Aug 30, 2010, 3:09:46 PM8/30/10
to TiddlyWiki
This Google group has really gone downhill. A lot of stuff I post
doesn't get answered

Dave

On Aug 23, 11:58 am, "Dave Gifford - http://www.giffmex.org/"

FrD

unread,
Aug 30, 2010, 4:26:34 PM8/30/10
to TiddlyWiki
Hello,

With InlineJavascriptPlugin, you could try :

<script>
var tid=store.getTiddler('dataentrythingy' );
var valueofformfield=tid.data("nameofformfield");
return valueofformfield;
</script>

FrD

On 30 août, 21:09, "Dave Gifford - http://www.giffmex.org/"
<giff...@gmail.com> wrote:
> This Google group has really gone downhill. A lot of stuff I post
> doesn't get answered
>
> Dave
>
> On Aug 23, 11:58 am, "Dave Gifford -http://www.giffmex.org/"

FrD

unread,
Aug 30, 2010, 4:51:53 PM8/30/10
to TiddlyWiki
Hello,

I've tried a transclusion :

Create a tiddler : DisplayDataEntry containing :

/%
!out
$1
!end
%/<<tiddler DisplayDataEntry##out with: {{
var valueofformfield="";
var tid=store.getTiddler('dataentrythingy' );
valueofformfield=tid.data('$1');
}}>>

Then in another tiddler you can use the transclusion :

<<tiddler 'DisplayDataEntry' with:nameofformfield>>

FrD


On 30 août, 21:09, "Dave Gifford - http://www.giffmex.org/"
<giff...@gmail.com> wrote:
> This Google group has really gone downhill. A lot of stuff I post
> doesn't get answered
>
> Dave
>
> On Aug 23, 11:58 am, "Dave Gifford -http://www.giffmex.org/"

Måns

unread,
Aug 30, 2010, 4:52:02 PM8/30/10
to TiddlyWiki
Hi Dave

Install Eric's WikifyPlugin http://www.tiddlytools.com/#WikifyPlugin
and Abego's DataTiddlerPlugin (needed for FormTiddlerPlugin)
http://tiddlywiki.abego-software.de/#DataTiddlerPlugin and write:
<<wikify %0 {{DataTiddler.getData("TiddlerName", "fieldname",
"fallbacktext")}}>>

Regards Måns Mårtensson

On 23 Aug., 18:58, "Dave Gifford - http://www.giffmex.org/"
Message has been deleted

PMario

unread,
Aug 30, 2010, 5:16:47 PM8/30/10
to TiddlyWiki
On Aug 23, 6:58 pm, "Dave Gifford - http://www.giffmex.org/"
<giff...@gmail.com> wrote:
> Hi guys
>
> I am sure this is simple, but, if I wanted a 'display' tiddler that
> accessed the data from a form field or drop down list in a data entry
> tiddler, what would I do?
A(3) possible solution [1] may look simple. But the way, to reach it,
isn't. (look at the 27 revisions)

> I am guessing something like <<tiddler 'dataentrythingy'
> 'tiddler.data("nameofformfield")'>>
It would be easier if you'd provide a data set and the result that you
want.
eg: <data>....</data>
result: ???? how it should look like.

With the <<tiddler ..>> info I only can guess, how the result should
look like. that's why there are 3 guesses.

1: the <data> section is part of the containing tiddler:
<<tiddler {{tiddler.title + '##echo'}} with:
{{DataTiddler.getData(tiddler.title, 'month')}}>>

2: the <data> section is inside 'TestDataTiddlerPlugin' <- could be
any name different to containing tiddler.
<<tiddler {{tiddler.title + '##echo'}} with:
{{DataTiddler.getData('TestDataTiddlerPlugin', 'amount')}}>>

3: if you use InlineJavaScriptPlugin
<script>
return 'description: ' + DataTiddler.getData('TestDataTiddlerPlugin',
'descr');
</script>

> How would I write something like that correctly?
>
> Dave
hope one of them helps.

have fun!
mario

have fun at q:)
[1] http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#TestDataTiddlerPlugin

function descriptions:
[2] http://tiddlywiki.abego-software.de/#DataTiddlerPlugin

Måns

unread,
Aug 30, 2010, 5:54:47 PM8/30/10
to TiddlyWiki
Hi again

Combining pMario's solution nr3 and Frd's transclusion:
(requires inlineJavascriptPlugin)
[[DisplayDataEntry]]
<script>
return '$1: ' + DataTiddler.getData('$2','$3','$4');
</script>

In another tiddler write:
<<tiddler 'DisplayDataEntry'
with:"description""TestDataTiddlerPlugin""descr""fallbacktext">>

Regards Måns Mårtensson

On 30 Aug., 23:16, PMario <pmari...@gmail.com> wrote:
> [1]http://hoster.peermore.com/recipes/TeamWork/tiddlers.wiki#TestDataTid...

PMario

unread,
Aug 30, 2010, 6:15:50 PM8/30/10
to TiddlyWiki
I really love the power of the tw syntax.
-m

Tobias Beer

unread,
Aug 31, 2010, 1:11:03 PM8/31/10
to TiddlyWiki
Hi everyone,

Sorry if this might not be helpful to the topic ... but with
transclusion and things like:

/%get section bar from tiddler foo%/
<<tiddler foo##bar>>

/%get slice b from tiddler a%/
<<tiddler 'a::b'>>

/%do the same using javascript%/
section=store.getTiddlerText('foo##bar');
slice=store.getTiddlerText("a::b","default");

/%and not to forget%/
store.getValue(tiddler,field)
setValue store.setValue(tiddler,field,value)

...what are the benefits of using DataTiddlerPlugin?


Could it be that the missing link (if missing indeed) are some...

store.saveSection(tiddler,section,text,visible);
store.saveSlice(tiddler,slice,visible);

...methods for writing those values back to a given tiddler if one so
choses to have them edited individually via some form?

Tobias.

Dave Gifford - http://www.giffmex.org/

unread,
Sep 3, 2010, 11:38:32 PM9/3/10
to TiddlyWiki
Thanks to everyone for your help! Blessings to you all

Dave

whatever

unread,
Sep 4, 2010, 2:48:18 AM9/4/10
to TiddlyWiki
tiddler.data("NAME_OF_FIELD_IN_DATA_SECTION") works for me.

w

On Sep 4, 5:38 am, "Dave Gifford - http://www.giffmex.org/"

PMario

unread,
Sep 4, 2010, 10:37:43 AM9/4/10
to TiddlyWiki
On Aug 31, 7:11 pm, Tobias Beer <beertob...@googlemail.com> wrote:
> ...what are the benefits of using DataTiddlerPlugin?
Some very well documented examples :?

> Could it be that the missing link (if missing indeed) are some...
>
> store.saveSection(tiddler,section,text,visible);
> store.saveSlice(tiddler,slice,visible);
>
> ...methods for writing those values back to a given tiddler if one so
> choses to have them edited individually via some form?
>
> Tobias.
Would be nice to have some. And needs to handle some specialities.
(I know of the tiddlytools plugin)

> store.saveSlice(tiddler,slice,visible);
not really a problem, to know where the end is. It's \n
search and replace inside a tiddler.
handle:
sliceName: value .. \n
|sliceName| value| \n
--> some others ??

> store.saveSection(tiddler,section,text,visible);
!section start
!!!section end ?
!!section end ?
!section end
--> I'd vote for a nested section handling

!section start
only one line to be replaced
forgot section end
--> ?

!an other section start
some text
!an other section start
uups 2 starts ?
--> ?

???

have fun!
mario


Reply all
Reply to author
Forward
0 new messages