Fetches data from XML database and loads into the related control.
Query
Query
Write your xQuery XQuery script here.
Scratch Query
You can use this query area for testing purposes.
...
- Name : Parameter name to be used in the xQueryXQuery.
- Value XPath: XPath for parameter data to be gathered and used in the query.
...
In order to map the selected data from xQuery XQuery result into a node of the form, create a mapping by pressing Add New button.
...
Target
XPath to map data into.
Examples
Code Block | ||||
---|---|---|---|---|
| ||||
for $i in /Instance
let $formNo := ($i/Number)
let $instance := unordered($i[Number=$formNo])[last()]
let $workItemId := unordered($instance/WorkItems/WorkItem/Id)[last()]
let $formDataId:= $i/WorkItems/WorkItem[last()]/DataId
let $form := form[data(@Id)=$formDataId]/PoolRoot
where
($evrakno = '' or ($i/Number/text() = $evrakno))
and ($tarihbslgc = '' or ($i/Start >= $tarihbslgc))
and ($tarihbts = '' or ($i/End <= $tarihbts))
and ($durum = '' or ($i/State/text() = $durum))
and ($departman = '' or ($form/Departman/Id = $departman))
order by $i/Start/text() descending
return
<Result>
<FormNo>{$i/Number/text()}</FormNo>
<DocId>{$workItemId/text()}</DocId>
<State>{$i/State/text()}</State>
<StartDate>{$i/Start/text()}</StartDate>
<EndDate>{$i/End/text()}</EndDate>
<InitiatedBy>{$i/WorkItems/WorkItem[1]/CompletedBy/@Caption/string()}</InitiatedBy>
<Subject>{$form/Konu/text()}</Subject>
<File>{$form/Dosyalar/Dosya/Id/text()}</File>
</Result> |