FacetSearchListener implementation details - sap-commerce-cloud

I have a requirement whereby I want to hide a product on the front end based on the product attribute.I am trying to implement FacetSearchListener, but I am stuck up as to how should I start.

Related

I need to filter the end points in swagger ui drf. How can i do in Django

I need to customize the swagger ui like filter. Which means if user login the user can see only particular end points. Now I am getting all the end points on my project. Every user can see all end points. How can I achieve that.

Best way to discern between two items on Bubble.io

So on my bubble site I am trying to find the best way for the Bubble.io to know when an item is a product or a service. If it is a service, I would need Bubble.io to present either a button or a whole new page for it. Please let me know the best way to do this or if you have a link/article please share it!
I think the best way should be to set up a product_type field in the database and create conditional displays for your front-end elements.
In detail, you should create the front-end for both product and service types. You hide the front-end elements for products when it's a service and vice versa.

Passing More than 1000 parameters in RESTful api

Our Dashboard have dropdown which consist of more than 8k products and we have such 4-5 dropdowns.
I want to filter data based on this dropdowns.
But if I selecting all products then restful api url is breaking.
Can i use azure bus service or similar message broker service to pass this complex and multiple parameters via service and which then consumed by all apis??
While I do understand what your need is I will suggest to re-think your approach as that will lead to a better user experience.
I will use a first drop down, completely empty, that will fill in options while the user types in whatever product list you have, that way, there is only a group of items that are filled in that the user is interested in.
I will also suggest not to load anything on that drop down until the user has entered, let's say, 5 characters.
After that let the user select an item from the dropdown, and filter the second drop down and continue to use the same technique with all drop downs you have.
Let me know if you have any questions around this approach and I will be more than happy to provide an example if you don't know how to do it.
Edit:
Including samples for load dropdown lists dynamically and also another post with an example on how to return some JSON from an Azure Function that can return the data in a dynamic way like you need.
From what I can see I think it'll be helpful for you to go through several different examples that can bring you progressive knowledge to what you need to achieve, first of all it'll be nice if you know how to load items dynamically on a dropdown list:
That is a nice example, you can have an entry where the user can type
whatever products you have and then they type, lets say, more than 5
characters go and search for that data.
https://www.codebyamir.com/blog/populate-a-select-dropdown-list-with-json
This other example shows you how to return data from an azure function
with the data that you need to show the users. This is not exactly
what you need as you need to receive a parameter with what the user
typed and search in your database for the items that match that search
and return that data in a JSON format so you can use it on your web
page to show the dropdown list. I will suggest to initially hard code
a few items and return those to check that the functionality is there
and once you have that up and running move to get the actual data from
the database.
How to return a JSON object from an Azure Function with Node.js

Django Viewflow with custom views - start different flows, depending on user selection in the first screen

I have a view with StartFlowMixin, it contains a form - user posts the form and a workflow starts. That works fine currently, but I need to introduce a dropdown in the form with 4 options - based on the selection in that dropdown I need to run a different flow.
E.g. the dropdown contains options like Apply for position A, Apply for position B, etc. Based on the selection the applicant needs to enter different information and different people need to approve the application.
How can I do this? One option would be to have a single workflow with a lot of ifs, but I don't like that.
The core of the BPMN approach for business process modeling is to record every user's decisions.
You could use flow.Switch for that case - http://docs.viewflow.io/viewflow_core_node.html#viewflow.nodes.Switch
Or you could use your own view, that would call required flow.StartFunction, to start actual flow - http://docs.viewflow.io/viewflow_core_node.html#viewflow.nodes.StartFunction

How do we make a crystal report print only specific fields based off of the user running the report?

We use a construction software, Viewpoint. We need a report to print the GL Accounts associated only with the user running the report. I was wondering if anyone had any ideas on how I could easily and efficiently achieve this? My "last-resort alternative" is just creating separate reports for each GL that pulls only that GL's info.
It depends on how the accounts are associated to the user. If there is a link, you can simply create a user parameter that asks for the user name. Then in the record select of the report you only pull accounts that match the user name in the parameter.
So, for example your parameter is called {?userName}. In the Record Select the formula would something like {Accounts.Salesman} = {?userName}, where {Accounts.Salesman} would be the field that links the user with the account.
You can get the current user name and use it to filter the records in your report. There are 2 ways to do this :
create a parameter, hide it and automatically fill the value. You
will need a special viewer for this scenario. Let me know if this is
what would you prefer I can give you some links. If you leave the
parameter visible the user can insert any value and view any records
use an UFL . For example this one:
http://www.viksoe.dk/code/u2lwin32.htm provides a function LoginName
which will return currently logged user. There are other UFLs which
support similar functionality, check if your company is already
using something . This one is free. You need to register the UFL on
each system which will run the report . Once registered the
available functions will become available for formulas.
I personally prefer the viewer solution because it is more flexible and will cover other scenarios too. However if you need just the username UFL will be a better approach.

Resources