#Issue related to Multi-select widget
1 messages · Page 1 of 1 (latest)
Hello there! Welcome to Appsmith Support.
Please help us with the following information for faster debugging.
- What is your current Appsmith version?
- Provide a loom.com screen recording showing your implementation and the issue
in action.
Object Id gets changed which is not predefined and also in api body i am not able to put ObjectId({{categories.selectedoptionvalues}})
Appsmith Business v1.9.32
Can you please share this app with us to debug this scenario? Add
[email protected] as a Developer and send us the link to it.
Pardon me, I cant't share the app due to privacy reasons but I can explain it properly now , API BODY: categories: [{"name":categories.selectedOptionLabels[0], "_id":categories.selectedOptionValues[0]} ] So, I am using Multi-select widget in which I am selecting more values which will be in array. So I want to pass those multiple label & value (i.e "name" and "_id") from multiselect widget to API BODY how to do that this is the issue.
<@&725604214666952714>
Hello there!
From the video you shared, I can see that you have an API that performs the
actual update on your MongoDB Database.
Could it be possible that something is going on with the API? Is there a way you
can add a log to the API just to confirm what value is getting to the API from
Appsmith?
Can you help me with this for now. Please...!
Hello! I need to what value is getting to your API. Without that, I can't tell
if the issue is with Appsmith or your API.
Can you confirm the value that gets to your API?
"categories": [
{
"name": "world",
"_id": "1"
},
{
"name": "technology",
"_id": "2"
}
] ----> In this format API want value.
Whereas, Appsmith makes Array of name in one index and _id in the othe index
"categories":[
0:{
"_id":[
0:"63d90f8aaabaf4bf0169"
]
"name":[
0:"nation"
]
}
] -------> this is what appsmith is doing if i use categories: [{"name":categories.selectedOptionLabels, "_id":categories.selectedOptionValues}] because multi select must give me array of objects which contains name and _id.
Hello.
I've done some testing implementing a local MongoDB database and an API to
interact with documents in that database, but I haven't been able to replicate
your problem.
As Olawale requested earlier, I'd like to insist on accessing your app for
testing directly, also with the value that's coming into the API. If this is
definitely not possible for your app to access, could you please do the same
test of the POST request with the hard-coded body values and check if this also
changes the ObjectId of the categories property? It would be great if you can
share us a video of this test.
Yeah, I did hard-code for this and it resolved. In Jsobject I am taking values from multi select widget pushing it into array and putting that jsobject function in the API body. So it runs when API is hit.