Get Free Trial

Flexmonster server custom parameters

Catalin Bratu asked on June 11, 2020

Is it possible to pass custom parameters to flexmonster server, so the sql query attached to a specific index can be customized?

3 answers

Mykhailo Halaida Mykhailo Halaida Flexmonster June 12, 2020

Hi Catalin,
Thank you for posting your question.
Even though it is not possible to specify custom parameters for your SQL query directly in your flexmonster-config.json file, there is a workaround that could work as required in case you need to narrow down the set of tables to select values from.
This approach involves defining your custom Data Server based on the already provided DLL. To start with, the customizeAPIRequest() API call can be used on the client-side to create customized requests with information about the current session/user or any other custom parameters. After this, the custom Data Server DLL can be set up in a way that the server-side returns different data set parts depending on the user info, which was passed to the server with the help of the customizeAPIRequest().
Feel free to check out the following GitHub sample illustrating this:
In the sample above, the request headers are customized in the DemoDataServerCore/wwwroot/js/site.js file, while the server-side parsing and corresponding data return are handled in DemoDataServerCore/Controllers/FlexmonsterAPIController.cs.
Please let us know if you think this approach would be helpful in your use case. If not, it would be great if you could tell us a little bit more about what exactly you are trying to achieve in general – this would help us understand the whole situation better and see whether there is a better solution we can offer.
Looking forward to your response.
Best regards,

Mykhailo Halaida Mykhailo Halaida Flexmonster June 23, 2020

Hi Catalin,
How are you?
We were wondering if you’ve found our previous suggestion helpful. Were you able to achieve the desired behavior, or are there still any questions you would like to discuss?
We would be happy to hear your feedback.

Mykhailo Halaida Mykhailo Halaida Flexmonster July 1, 2020

Hi Catalin,
Hope you’re doing well!
We are just checking in to ask whether you’ve received our previous response. Was our suggestion helpful, or do you still have anything you would like to discuss?
Please let us know what you think.
Kind regards,

Please login or Register to Submit Answer