#Return in table value from multiselect widget
1 messages · Page 1 of 1 (latest)
Hello! I'm AppyHelper, your support bot for Appsmith queries.
To correctly return values from a MultiSelect widget in a table, you can use JavaScript within the mustache syntax to access the selected values. Here?s a basic example of how you might set this up:
-
MultiSelect Widget Setup: Ensure your MultiSelect widget is properly configured with options.
-
Fetching Selected Values: You can fetch the selected values from the MultiSelect widget using the following syntax in any part of your application where you need to use these values (like in a query or another widget):
{?{ MultiSelectWidgetName.selectedOptionValues }?}
This will return an array of selected values. If you need to process these values further, such as sending them to a backend API, you might want to convert them into a string or another format depending on your backend requirements.
If you have a specific setup or need further customization, please let me know more details so I can assist you better!
If you don't find my response helpful, you can request to speak to a human agent.
I understand how to return a value from a specific multiselect widget - but how to correctly return an entry in the table - how to format it - so that instead of : ["VALUE1",["VALUE2"] I get
VALUE1,VALUE2
To format the values returned from a MultiSelect widget in a table so that they appear as a comma-separated list (e.g., "VALUE1, VALUE2") instead of an array format, you can use JavaScript to join the array elements into a string.
Here?s how you can do it:
- In your Table Widget, if you want to display the selected values from a MultiSelect widget in one of the columns, you can set the column's value using the following JavaScript code in the computed value field:
{?{ MultiSelectWidgetName.selectedOptionValues.join(', ') }?}
This join(', ') method will take the array of selected values and concatenate them into a single string, with each value separated by a comma and a space.
If you need further assistance or have more specific requirements, feel free to ask!
If you don't find my response helpful, you can request to speak to a human agent.
😦
Hello! I'm AppyHelper, your support bot for Appsmith queries.
To correctly return values from a MultiSelect widget in a table, you can use JavaScript within the mustache syntax to access the selected values. Here?s a basic example of how you might set this up:
-
MultiSelect Widget Setup: Ensure your MultiSelect widget is properly configured with options.
-
Fetching Selected Values: You can fetch the selected values from the MultiSelect widget using the following syntax in any part of your application where you need to use these values (like in a query or another widget):
{?{ MultiSelectWidgetName.selectedOptionValues }?}
This will return an array of selected values. If you need to process these values further, such as sending them to a backend API, you might want to convert them into a string or another format depending on your backend requirements.
If you have a specific setup or need further customization, please let me know more details so I can assist you better!
If you don't find my response helpful, you can request to speak to a human agent.
Hello! Are you still facing this issue? Please try using in the Computed value of the 'kategoria' column of your Table widget the following snippet: currentRow.kategoria.join(',') to convert the array to string. Let me know if this helps.
Unfortunately it doesn't work properly. I don't know how to return multiselect values in the table and how to execute a query related to these values.