session.lead_id=request.vars.id in the 'leads' function. Then the note... current = session.lead_id
= is assignment == is comparison On Thursday, April 24, 2014 10:11:29 AM UTC-7, Derek wrote: > > put it in the session... > > On Thursday, April 24, 2014 9:49:28 AM UTC-7, Greg Vaughan wrote: >> >> Sorry I should have given you all the data... >> >> The db table is a simple one >> >> # HISTORY >> >> db.define_table('notes', >> Field('business', 'reference calls', >> writable=False >> ), >> Field('note', 'text', >> label='Add Note' >> ), >> auth.signature, >> format='%(business)s' >> ) >> >> >> The controller is as above... >> >> note.load is simply >> >> {{=response.toolbar()}} >> <h4>Notes:</h4> >> {{for note in notes:}} >> <div class="note"> >> On {{=note.created_on}} {{=note.created_by.first_name}} >> says <blockquote class="note_body">{{=note.note}}</blockquote> >> </div> >> {{pass}} >> >> load is only called in a couple of views at the moment until I get this >> sorted out... >> >> for example in leads.html (the one in the screenshot) >> >> {{extend 'layout.html'}} >> {{=form}} >> {{pass}} >> {{block right_sidebar}} >> {{=LOAD('default','note.load',ajax=True)}} >> {{end}} >> >> >> >> >> On Friday, 25 April 2014 02:03:22 UTC+10, Niphlod wrote: >>> >>> how are you using LOAD to load the component ? >>> >>> On Thursday, April 24, 2014 5:23:21 PM UTC+2, Greg Vaughan wrote: >>>> >>>> Hi Niphlod... >>>> >>>> {{=response.vars}} shows nothing... nor does {{response.toolbar()}}... >>>> db stats shows notes.business = 1 when I hardcode it as above... >>>> >>>> I took a screenshot here <http://screencast.com/t/mmRPGOHUAjt> >>>> >>>> I assume that the filter will have to be sorted in the controller as >>>> the LOAD function would be serialised before the page is loaded? I could >>>> be >>>> completeley wrong of course. >>>> >>>> On Friday, 25 April 2014 01:00:04 UTC+10, Niphlod wrote: >>>>> >>>>> why are you saying that vars are unavailable for LOAD ? >>>>> >>>>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.