Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Dynamic Forms from Data

say i have a set in java whose length is not fixed and it changes with time, who do we pass this set into the form and use it to display those set values as options in drop down menu in forms created by symphony bots.
Is it possible to do so , if yes could you provide the solution in java language.

Posted 2 months ago
Edited 16 days ago


Facing such error what should i do?
Error:Error parsing EntityJSON: Syntax error in template "messageML" in line 4, column 48: The left hand operand of ?index must be a loop variable, but there's no loop variable in scope with this name: answer

<form id="raise-ticket">
<h2 style="color:white;">Application Name</h2>
<button name="option-${answer?index}" type="action">${answer}</button><br/>

kunaal bokadia   2 months ago Report

you will need to programtically use the below example in a chat bot as there is reliance on data also being parsed into the messageML for the templating engine to loop over.

Vinay Mistry   2 months ago Report
Votes Newest


Hi Kunaal,
For this use case you can leverage message templating.

Our Poll Bot implementation uses a data object which contains answers to a poll, which is a list of strings, https://github.com/SymphonyPlatformSolutions/symphony-poll-bot-java/blob/main/src/main/java/com/symphony/devrel/pollbot/command/CreatePollFormReply.java#L145-L152

        // Construct poll form and blast to audience
        Map<String, ?> data = Map.of("data", PollBlastData.builder()
        Message message = Message.builder().content(pollService.getMessage("poll-blast-form", data)).build();

We then use a Freemarker template to iterate on the answers field to produce the respective number of buttons with labels, https://github.com/SymphonyPlatformSolutions/symphony-poll-bot-java/blob/main/src/main/resources/templates/poll-blast-form.ftl#L11-L13

    <#list data.answers as answer>
        <button name="option-${answer?index}" type="action">${answer}</button><br/>
Posted 2 months ago
Vinay Mistry
23 × 2 Administrator

can this same method be used to create drop down list in a form? And the form contains many other parameters and finally we submit the form. So in that case will the above logic work or few changes needs to be done?

kunaal bokadia   2 months ago Report

using the above exmaple you can create forms based on the data set that is provided within the data object.

The way you choose to display those data objects in the form is entirely up to you. You could use a dropdown list, radio buttons etc.

Vinay Mistry   2 months ago Report
1 Answer
2 months ago
16 days ago