Date: Tue, 19 Mar 2024 03:50:46 -0700 (PDT) Message-ID: <486504262.751.1710845446603@wiki-nsc.agiloft.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_750_307018380.1710845446602" ------=_Part_750_307018380.1710845446602 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Since Java scripts have full access to the whole Agiloft functio= nality, the script author may retrieve whatever linked records he needs. Th= is gives the script developer more flexibility due to no constraints on mul= tiple linked fields or depth of followed links and causes minimal performan= ce impact as long as only the necessary data is retrieved.
However, it is not necessary to fill the linkholders - they will be reco= nstructed automatically from the values supplied to one or more of the Link= ed Field data columns. It is important here NOT TO COPY a set of values fro= m the source record and change just some of them, as it may lead to links n= ot being restored correctly.
In perl/exe scripts Linked Fields are exported like any other fields tog= ether with the linked record from the donor table. Please note, that the li= nked record is exported only for a single Linked Field for performance reas= ons.
To create a link it is enough to set a value to one of the Linked Field = data columns, which is done in the same way as for any other field. For exa= mple, if you want to change the Assigned To for a record and the Linked Fie= ld data column is named 118_f_login; you can find this column name in Table= wizard on Fields tab in column "Field name"; then put the following to the= output file:
<fiel= d name=3D "_118_f_user_login"/> <value>Umbra</value> </field>
or if you are using Agiloft Perl Script API call
EWset::= setRecordField('_118_f_user_login','Umbra');
The script running engine will try to find the best matching record in t= he donor table and set the Linked Field link to that record. It works the s= ame way for "multiple fields from other table" LF, but you are free to fill= only a subset of LF columns. For example, if there are fields User Login a= nd User Phone exported to your table, you may provide a value just for the = User Login if you are sure it will result in an exact match.
This will always work for user login, since they are unique across each =
KB, but other fields could contain repeating values. In this case one has t=
o fill additional fields to achieve a unique match, otherwise the first sui=
table match will be used.
If no match at all is found, the link will be left empty.