Seriously!!!

I have a long way to go before I get to the level some of you have 
achieved. All that to say that your code is obviously working much better 
than mine so thanks a lot!

What kills me is that of course it is all there in the documentation. I 
just can't make the connection when I read it. 

Hopefully I will learn eventually.

<digressing>
I want to say that I am really grateful with the help I receive from this 
group. Everybody is very helpful and is showing a huge amount of patience 
with rookies like me.

I have been browsing the thread in order to find some answers to my 
question and not once have I stumble upon a post where someone is being 
rude to someone else.
You don't get many place like that anymore. Especially in the programming 
world :(

So again thanks everyone

On Thursday, 10 November 2016 19:58:57 UTC, Mark S. wrote:
>
> Since I don't have your 3rd party plugins, I can't try out your code. But 
> I don't think your use of <$view> will work. See if this gives you a better 
> result for boo:
>
> <$set name="boo" filter="[[dayNumber]getindex{$:/_ppmt/temp/selectday}]">
>
> Good luck,
> Mark
>
> On Thursday, November 10, 2016 at 11:28:27 AM UTC-8, Philippe Le Toquin 
> wrote:
>>
>> Hello,
>>
>> I am again probably misunderstanding something but I can't see what.
>>
>> I have the following code in a tiddler to select a day of week and create 
>> a new tiddler out of it.
>>
>> \define maketitle()  $(year)$ $(week)$ $(selectedday)$
>>
>> \define getnumber()  <$view tiddler="dayNumber" index=$(selectedday)$ \>
>>
>> !Add to the Weekly Record schedule for week <<now WW>>
>>
>> Select a day : 
>> <$select tiddler="$:/_ppmt/temp/selectday" default=<<now DDD>> >
>> <option>Monday</option>
>> <option>Tuesday</option>
>> <option>Wednesday</option>
>> <option>Thursday</option>
>> <option>Friday</option>
>> <option>Saturday</option>
>> <option>Sunday</option>
>> </$select>
>> &nbsp;&nbsp;
>> <$set name="week" value=<<now WW>> >
>> <$set name="year" value=<<now YYYY>> >
>> <$set name="selectedday" value={{$:/_ppmt/temp/selectday!!text}}>
>> <$set name="boo" value=<<getnumber>> >
>>
>> In the tiddler it works <<boo>> but if I click on the button to create a 
>> new day then it crashes
>>
>> <$maketid  title=<<maketitle>> tags="dailywork" template=
>> "$:/_ppmt/template/Daily_Records" edit="yes">
>>    <$iftid tiddler=<<maketitle>> then="tm-edit-tiddler" else=
>> "tw-new-tiddler">
>>        <$button message="tw-if-tiddler">
>>          Create / Edit Selected day
>>        </$button>
>>    </$iftid>
>> </$maketid>
>> </$set></$set></$set></$set>
>>
>>
>>
>> The macro getnumber() is reading from a dictionnary tiddler that map the 
>> day of the week to a numbe from 1 to 7.
>>
>> the value week, year, selectedday and boo are used in a template to 
>> populate some field. All was working well until I introduced the variable 
>> boo to the template. At this point I get the following error
>>
>> Internal JavaScript Error
>>> Well, this is embarrassing. It is recommended that you restart 
>>> TiddlyWiki by refreshing your browser
>>> SyntaxError: JSON.parse: expected ',' or '}' after property value in 
>>> object at line 1 column 750 of the JSON data
>>>
>>
>> What confuses me is that the macro is working since I can use it in the 
>> tiddler above and it display the correct number but in the templates it 
>> fails :(
>>
>> Philippe
>>
>

-- 
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/148ef2f8-7a89-4cdd-86a9-c49524f59c51%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to