Comments (10)
Give your example.
from metamagik.
Say for the "columns" table in kanboard, I want a drop down field showing "title" column values based on "project_id" column value equals a certain value.
So with the DB field format
tablename, keycolumn, valuecolumn
instead of using
columns, title, title
which will list ALL values in the "title" column.
Is it possible to use
columns, project_id=5, title
which will list only values if "title" belonging to "project_id=5"
I guess I am not sure about the difference between keycolumn and valuecolumn.
When do we use different column names for keycolumn and valuecolumn ?
Are they always the same ?
Thanks for your help.
from metamagik.
Not gonna lie, I didnt incorporate this feature, not really used it much either. I'll take a look though and see if I can make it work as requested.
from metamagik.
Although, now that I re read the question, I'm pretty sure it doesnt work that way. My thought would be key column should be what you see in the dropdown, valuecolumn should be the set of values that relate to the key. So, projectid=5 would not work, because it not the whole column, and the corresponding values column would have to match the key column in number. But, not really sure. So, I'll take a deep look at the feature, and report back its usage, and then we can go from there.
Example of what I think it should be:
Table=users
Keycolumn=name
Valuecolumn=id
Dropdown is list of user names, but selecting a user stores the user's id in the value of the field.
This is how key/val works, and I'm pretty sure, maybe about 55%, this is how the feature works, but it's been so long since I've tinkered with it.
If I'm correct, which I'll check, what I can do is make that type of field, project specific, if you chose the project scope, versus global scope. So, that way, the titles will only correspond to the project its it's in. I say this with out looking at it, so hopefully it Is that simple. Might even look at protecting that field so no one can break things.
from metamagik.
@githubetc So, after playing with it, it does not seem to work the way I would expect it to. Next chance I get, I'll improve, and possibly add a field to address your need. No timetable though.
from metamagik.
Thanks for investigating the issue and improving it.
Something general that supports ability to select only rows with a certain column value
e.g. "project_id=5" as discussed above
will be extremely useful.
Not sure what is the best way for me to contribute.
Will a donation of say US$200 be proper or even enough for such an improvement ?
from metamagik.
Donations are always welcome and very grateful for them. Whatever you feel comfortable donating. I'll take care of this tomorrow for you.
from metamagik.
I have donated US$200 via the donate button (it went through paypal).
Thanks for your help with this.
from metamagik.
https://github.com/creecros/MetaMagik/releases/tag/1.4.0
Give her a test drive. Let me know if you have any issues.
To produce your result, per your request, choose the new field type, Column from DB, based on equals Criteria
in the options, and this is an example, enter: tasks,project_id,5,title
this would provide a list of all task titles in the project with the id 5.
Also updated key/val to work as I would expect and added deselect options for all.
from metamagik.
Also, i appreciate the donation, Thank you!
from metamagik.
Related Issues (20)
- Keep values of custom fields if one required field is empty HOT 3
- About $ sign HOT 11
- Edit Fields HOT 3
- Feature request HOT 10
- Referencing custom field in automatic action HOT 5
- Custom field caption HOT 3
- metakey and metaval filters seem not to be working HOT 9
- using API with MetaMagic HOT 25
- [Feature request] Text area fields should be the same width as the parent column HOT 1
- Go
- The task creator will always be current user when import a task. HOT 2
- Feature Request: Label Custom Field Columns HOT 7
- I am unable to select and copy text from metamagic tables in task view HOT 1
- Sales pipeline, amounts and percentages HOT 6
- No Webhook-Notification upon changes to meta field values
- Cannot unassign tasks when MetaMagik is active HOT 4
- Autocomplete function for fields with many values
- Bug with MetaMagik HOT 1
- Add data-key and data-value to HTML elements
- Key-Value from DB with giving tablename,keycolumn,valuecolumn stop working HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metamagik.