Multisource Problem

Hi all,
I have a problem with multisource.

My scheduler is in UNIT view and I use the connector.
My second source is another scheduler in UNIT view but the DB is for recurring.

The problem is:

When I insert an event (in the first scheduler) there is not problem, the scheduler render the inserted event and events from another source.
But when I refresh the page the event disappear and I view only the events from second source.
I see in the DB and the event is inserted.
My code:

scheduler.load(["php/events.php?uid="+scheduler.uid(),"../../php/events.php"]);

Can you help me ?

The problem can be in IDs, when you are loading data from two different tabels - it possible that records in them have equal IDs, and scheduler will not be able to separate such events.

You need to have unique ID values for each event record.

Thank you Stanislav.
Perfect, now work.
The problem was IDs

I have another question/problem.

Now, I have undefined event_text and event_header in slot from second source because in first source I have custom scheduler.templates.event_header
and

scheduler.templates.event_text

There is a possibility of customize event_text and event_header from second source ?

and the second source readonly.

Thank you very much.

Sondra.

There is no way to have different templates for different sources, but you can provide some custom property for events from different sources, and based on it branch logic inside template

scheduler.templates.event_text = function(s, e, ev){ if (ev.some){ return logic_for_source_1(); } else { return logic_for_source_2(); } }

Thank you Stanislav, the logic work in event_text.
But I have problem in event_header, all my logic don’t take effect.

Can you help me ?

Sondra.

event_header works exactly the same as event_text, it hardly possible that one will work and other will not

Ahhhh. !!!
Sorry Stanislav, I have custom template:event_header with query_string link.
And now I have a big problem.

Any suggestion Stanislav ?

Thank you.

Hello, sondra.

Can you please show your event_header template you are trying to use (one that fails)?

Best regards,
Ilya

Hi Ilya.

[code]scheduler.templates.event_header=function(start,end,event){
return “”+event.customer+"  “+”"+format(event.start_date)+"–"+""+format(event.end_date)+"";

}[/code]

Thank you.

Sondra