Plan Lekcji - Pomoc online
EduPage e-Nauczanie Pomoc online

flag aSc Plan Lekcji - Importowanie danych

=ID numbers in import/export
Artykuł ten dostępny jest w: gb.gif pl.gif ru.gif gr.gif lt.gif bg.gif

What does asterisk in ID number means?
When exporting from aSc Timetables to XML file, you may get exported id numbers looking like *1, *2, *3. These are so called "temporary id numbers". These numbers are assigned during export to objects that do not have any id number assigned yet. They are called "temporary", because they are valid only during one particular export. When you export same timetable next time, you may get different temporary id for the same object exported.

These temporary ids are needed to provide links between rows in tables, e.g. lesson row can link through temporary id in "teacherid" column to table of teachers.

If you want to get some real id numbers exported, you need to configure so called "idprefix".

IDPREFIX - How to specify where aSc Timetables should store your id numbers?
When creating XML you wish to import to aSc Timetables, you must fill in global option "idprefix". Example:

<timetable importtype="database" options="idprefix:MyApp" displayname="MyApp sample XML configuration" displaycountries="us">

Id prefix option specifies where should aSc Timetables store your id numbers. In the above example, your id numbers will be stored in custom field called "MyApp ID".
See also: Dostosowanie zawartości widoku i wydruku

How to specify idprefix during export
When you use default XML export from aSc Timetables, you will always get temporary ids exported (because internally idprefix is set to %TEMPID). To specify idprefix for export, you have to create your own XML export configuration file. These files are stored in directory C:\timetables\template\xmlexport\. You can find example in sample.xml file.

Special idprefix values
%NAME - id is stored in name of object.
%SHORTNAME - id is stored in short name of object.
%NUMBER - id is stored in number field of object.
%TEMPID - do not store id numbers in timetable (this is default).

You can specify idprefix value also per individual tables with "idcf:" table option. E.g. if you want to store id numbers for students in "number" field, simply use:

<students options="canadd,idcf:%NUMBER" columns="....">

Note: There is a difference between "idprefix:" and "idcf:" when id is stored in custom field. With "idprefix:MyApp" aSc Timetables will append " ID" to the end, but with "idcf:" you need to use full custom field name: "idcf:MyApp ID".

Documentation
You can find further details here. Check "Types - id", "Database options - idprefix" and "Table options - idcf".


Ten artykuł bardzo mi pomógł Ten artykuł bardzo mi pomógł
Ten artykuł jest niezrozumiały Ten artykuł jest niezrozumiały
Szukam czegoś innego Szukam czegoś innego

Ten artykuł był oglądany 94829 razy.2757 / 94829
ViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViewsViews

Poprzedni artykuł Wróć do strony głownej pomocy aSc Plan Lekcji Następny artykuł