passing a filter to DB connector

Hello,

just playing with the dhtml scheduler… 2 questions…

  1. is there a way to pass a filter value to the db connector ?. I just want to display the records for the current user, not all the records in the table… is there a sample available?, I haven’t gone through them all. Using MySQL connector… working fine records being displayed no problem

  2. I have a field on the form – subject, when you double-click the event to edit the data the subject field is blank, but the data shows in the header portion – which should be in the subject field, my other field details returns the data correctly in the field, is normal behaviour or do i have a field name mismatch?

any advice appreciated,
Johnny

got Q1 answer:
$scheduler->render_table("select * from events where userId = ".$user_id,“event_id”,“start_date,end_date,event_title,details”);

Hi,
the lightbox inputs takes values from the properties specified in map_to property, e.g.
{ name:“details”, map_to:“subject”, type:“textarea”}

Probably your property is empty when event is created, you can set initial values using this API event
docs.dhtmlx.com/scheduler/api__s … event.html

Hi Aliaksandr,

thanks for the info… that’s for a new event i’m assuming, i’m having the issue on the editing of an existing event.

if you look at the image shot, the field is emtpy, but the data is shown next to the event date at top… am i using a wrong/invalid tag?, sometimes it will show up but 99.999% it doesn’t
as a test i mapped_to:details and it appeared at the subject tag.

scheduler.config.lightbox.sections=[
{name:“Subject”, height:20, map_to:“event_title”, type:“textarea” , focus:true},
{name:“Details”, height:45, type:“textarea”, map_to:“details” },
…more
};

events.php
$scheduler->render_sql("select * from events where userid = ".$user_id, “event_id”,“start_date,end_date,event_title,details, client_id, property_id, inspector_id, userid,datecreated, createdby, lastmodified, modifiedby”);

Thanks,
Johnny


,"start_date,end_date,event_title,

The first 3 fields in the SchedulerConnector render command will be available on client side as

  • start_date
  • end_date
  • text

You need to use “text” instead of “event_title”

hi Stanislav,

thanks a million!, that was the issue

Johnny,