Draggable list - change a filed value when drag and drop

82 views
Skip to first unread message

Mohammad

unread,
May 28, 2018, 4:15:02 AM5/28/18
to TiddlyWiki
I have a draggable list as below

<<list-tagged-draggable tag:"$(currentTiddler)$">>


Every tiddler has a filed called "page". My question is when I changed the order of tiddlers by drag and drop, I want the value of this filed
changes accordingly. To explain more, I have three tiddlers like below


Tiddler-A
Tiddler-B
Tiddler-C

Their page filed value is like 001, 002, 003, then using drag and drop I change the order as below


Tiddler-C
Tiddler-A
Tiddler-B

Now, I want the filed values change accordingly i.e page filed of Tiddler-C now should have the value: 001, Tiddler-A: 002, Tiddler-B: 003


How can I do this?


Thank you

TonyM

unread,
May 28, 2018, 9:27:02 AM5/28/18
to TiddlyWiki
Mohammad,

Since no one has answered in 5 hours can I suggest (having not tested it) you instead generate the page number as you list the tiddlers all as one, perhaps using Evans Formula plugin to increment the page number? 

Is there a reason you feel you need to set a field page number when you are likely to change the order anyway? Why not get that number just in time?

Other wise to set a field value you will need to trigger an action wizard in a button to set the field, for each tiddler. Look for solutions that apply a tag to every tiddler in a list for a parallel solution, that you can change to a field, after all tags are just values in the tag field.

Regards
Tony

Mohammad

unread,
May 28, 2018, 9:47:01 AM5/28/18
to tiddl...@googlegroups.com
Hi Tony!
 Thank you for your advise.
Yes, you are right, I can number the tiddlers at the end i.e after final change, I click a button to do that in the final list.
Let's try that!

Actually, I use a page number for a sequence of tiddlers! when I reorder them for example adding some tiddlers in between or changing the position of them, I need to correct this number and it can be done or added at the final step.

Best
Reply all
Reply to author
Forward
0 new messages