icstechsales/dql-explorer

Query by Form : No fields in dropdown

TomVanAken opened this issue · 2 comments

When I try to build a query using a Form, I'm unable to select fields. Neither in the Query Builder section, nor in the Columns/Fields to display ... section.
When I look at the network traffic in the browser (Firefox), the agent getFieldNamesFromForm is called with the appropriate parameters and I get a valid JSON containing all fields.

[{"name": "$fldSecAuthors","displayName":"$fldSecAuthors","type": "name"},{"name": "StoreId","displayName":"StoreId","type": "text"},{"name": "StorePhone","displayName":"StorePhone","type": "text"},{"name": "StoreCountry","displayName":"StoreCountry","type": "text"},{"name": "StoreRegion","displayName":"StoreRegion","type": "text"},{"name": "StoreCity","displayName":"StoreCity","type": "text"},{"name": "StoreZip","displayName":"StoreZip","type": "text"},{"name": "StoreStreet","displayName":"StoreStreet","type": "text"},{"name": "StoreName","displayName":"StoreName","type": "text"},{"name": "StoreBanner","displayName":"StoreBanner","type": "text"}]

Thus the agent is called and returns values, but the comboboxes are not filled with the data.
I don't see any errors in the browser console.

I'm running the database on a Domino V11 beta 1 server, but I assume this is not a server issue, since the agent returns valid data.

Please advise.

This seems related to #23
because when I change the form name to the alias name, all works well.
It is strange though, since I get valid data back from the getFieldNamesFromForm agent.

Thank you for those details, I think I need to change

selectedObject = selectedDatabase.forms.find(form => form.name === fvfName);

To be similar to

selectedObject = selectedDatabase.viewsfolders.find(viewfolder => viewfolder.alias !== '' ? viewfolder.alias === fvfName : viewfolder.name === fvfName);

Will update this weekend.