I'm trying to create an autocomplete functionnality with the custom picker component. Basically, it would live query a service with a text parameter (the field we are typing in).
I've created an expression rule which seems to works well :
if( rule!APN_isBlank( ri!searchText ), a!dataSubset( data: {}, identifiers: {} ), with( local!resultat: rule!XXXX_Adresses_Integration( ri!searchText ).result, local!adresses: if( rule!APN_isBlank( local!resultat.body.results ), {}, local!resultat.body.results.attrs.label ), local!filteredAdresses: union( local!adresses, local!adresses ), a!dataSubset( data: local!filteredAdresses, identifiers: local!filteredAdresses ) ))
Basically, it returns me a DataSubset based on the query.
This is a Dataset with result :
'type!{www.appian.com/.../2009}DataSubset'('sort': {null}, 'data': {"Chemin des Uttins <b>1267 Coinsins</b>", "Avenue des Uttins <b>1180 Rolle</b>", "Rue des Uttins <b>1436 Chamblon</b>", "Rue des Uttins <b>1400 Yverdon-les-Bains</b>"}, 'identifiers': {"Chemin des Uttins <b>1267 Coinsins</b>", "Avenue des Uttins <b>1180 Rolle</b>", "Rue des Uttins <b>1436 Chamblon</b>", "Rue des Uttins <b>1400 Yverdon-les-Bains</b>"})
This is a Dataset with no result :
'type!{www.appian.com/.../2009}DataSubset'('sort': {null}, 'data': {}, 'identifiers': {})
But when I try to use it in my interface, I have difficulties.
This is the code of my custom picker (I've tried multiple configurations) :
a!pickerFieldCustom( placeholderLabel: "--Select a New Case--", label: "Custom Picker", labelPosition: "ABOVE", maxSelections: 1, suggestFunction: rule!SIRA_SearchAdress(ri!rule_Enseigne.Localite), selectedLabels: if(fn!isnull(ri!rule_Enseigne.Localite),null, ri!rule_Enseigne.Localite))
When I try to type something in the field, this is the error message I have :
Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error at function a!pickerFieldCustom [line 86]: The function 'suggestfunction' is unavailable.
I don't know how to debug, and what I've done wrong. Has someone an idea ? Is it possible to do such a functionnality ?
Discussion posts and replies are publicly visible