Discussion Board for collaboration on QlikView Scripting.
I' ve adapted a Query of a colleague, the requirement is a loop.
We' re working with pixi (ERP) and using APIs to get any Information...
With this Script we' d like to get the available & physical stock of an Item.
For the API, we' ve to put in the EAN Code to get an result.
Loading all EANs
EANUPC as EAN
FROM [lib://pixiReadItems (nickismode_administrator)]
(XmlSimple, table is [Envelope/Body/pixiReadItemsResponse/pixiReadItemsResult/SqlRowSet/diffgram/SqlRowSet1/row]);
Put them into the API with a Loop
FOR Each BN in FieldValueList('EAN')
[Pixi Get Item Infos]:
Webfile, generated with QV Source
Let Libr =
Reading the needed Information
FROM [lib://pixiGetItemStock (nickismode_administrator)]
(XmlSimple, table is [Envelope/Body/pixiGetItemStockResponse/pixiGetItemStockResult/SqlRowSet/schema]);
but it doesn' t work the way we wanted to.
It loads and loads but there' s no result... I hope you can help me.
Fieldvaluelist is not a valid qlik-function - your script should be more look like:
//Loading all EANs
concat(EANUPC, chr(39) & ',' & chr(39)) as EAN
let vEANList = fieldvalue('EAN', 1);
//Put them into the API with a Loop
FOR Each BN in '$(vEANList)'
I must correct me that fieldvaluelist() is really an undocumented but valid function, see: https://www.qlik2go.net/en/2015/06/08/a-beautifull-list-with-fieldvaluelist-2/