New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function in LHS #287
Comments
What about creating new operator for this? |
Thanks for replying! |
I'm facing the same problem (kind of).
But what if users want to select function in first box and UI will show as when we select (valueSources == func) => then select operators => then input value...would it be possible to use either a function or a text box just as we can do in value field? |
When I think about function in LHS and how it would be like, UI seems overbloated as for me. Can you please draw simple draft how it should look like and behave in your opinion? |
Seems possible to do. |
that would be great, while waiting maybe I'll use this solution (https://codesandbox.io/s/quirky-solomon-9vhnp?file=/src/demo/config_simple.js) temporarily, ill keep track of your update |
Hi guys. |
@andres99x I don't think there is a proper workaround. It's a complex feature, one of most requested ones.
|
@ukrbublik thanks for you prompt reply, i understand it's a complex feature. |
We are looking into the same issue of using function or a value as the Left Hand Side of the comparison. @ukrbublik Apart from the UI/UX doubts do you see any risks in implementing this feature? Or do you have a plan/idea on how to approach this feature request? |
@meniga-marcin I have a plan to implement this feature, but it requires free time. Can you please describe the need of value in LHS? Let's say, you want |
Right, we might support you on this one and contribute with a solution - just wanted to gather your opinion on how to approach this. We aren't familiar with the internals of the library and will need to dig into it to make the change.
In our case we need to do a comparison of a
Just thought that adding value in LHS might be easier than adding a function in LHS but after a brief look at the model I suppose it would be the same effort. Hence adding function as a LHS should suffice. |
I have an idea to not add "three dots" in LHS like in this coment. But instead allow user to start a rule with a field always (as now), and add button "convert field to a function" (maybe just neat icon "f") that opens a list of functions appliable to selected field (eg. for text field functions can be "length", "uppercase" etc.). And after selection of function LHS will be converted to a function with previously selected field as an argument. Another way would be as suggested in this coment but it has one disadvantage in my optinion - we'll have to list ALL functions for all possible types (date functions, text functions etc.) Thay could be grouped of course, but still..
Nice to hear
Maybe it would be reasonably create discord/slack channel for development questions? |
The problem is already existing logic, if we want to provide a facility to see the existing logic in query builder then we may have to provide the facility to have value as well in LHS. Otherwise your point was valid. |
"three dots" in a first LHS is required, if user doesn't want he will not select the dots. And on clicking of dots give option like field or function. if a function is selected give list of functions and then allow him to select the fields. |
awesome work on this query builder! I would love to see that feauture, too. But I know doing this in the free time is hard |
@ukrbublik LHS seems very important feature missing here, please take on this priority. |
@ukrbublik I'm going to start preliminary development work on this, but I want to make sure that something isn't already started. My plan is to make the LHS pretty much exactly the same as the RHS, meaning that you'll be able to put fields and functions on the LHS using the ∨ selector (values are more complicated because the widget would need to be specified as well, so I'm leaving those out for now). I plan to keep "fields only" as the default. |
@rhallerman1 I'm glad you wrote this |
@ukrbublik I'm trying to use dropdown (Value, Field) on the left hand side before or after Slider dropdown. |
@tejamannava Not possible for now. Planning to add this feature in 6.x version |
@ukrbublik Can we pass a specific funcs to each added record? |
@ukrbublik Sorry for the long delay -- my team reprioritized things so I was working on unrelated stuff for quite a while. I'm back to this now, though. Would it be possible to somehow talk and discuss the general requirements/file locations for this? I already have some changes made, but going through those and my many other questions would be very helpful. |
You can ping me on discord, tomorrow I should have time |
I'm still working on bugs and other cases, but will hopefully be able to make a PR soon. |
@ukrbublik Any idea/plan/hope for when this will be added and released? I don't know how much work is still left before you'll be comfortable releasing it, since I realize that I only really implemented the basic feature. |
@rhallerman I was busy with big PR #866 , now it's merged so my top priority now is to merge your PR, after fixing tests |
I want the queryString look like this:
lowercase(process.Name) == 'abc.exe'
but currently, all I can do is:
process.Name == lowercase('abc.exe')
The problem is that I don't know how to make the first field to have the property "valueSources" so that I can create the queryString look like lowercase(process.Name) == 'abc.exe'
So it would be great if I can customize the positions of fields or select "valueSources" property in the first field (currently "valueSources" can just be chosen in the value field which is after the operators field)
If you know how to do this, please help me ^^ thank you
Note: Sorry for my english if you find it difficult to understand what I try to talk about ;(
The text was updated successfully, but these errors were encountered: