Giter Club home page Giter Club logo

Comments (10)

creecros avatar creecros commented on August 27, 2024

Give your example.

from metamagik.

githubetc avatar githubetc commented on August 27, 2024

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.

creecros avatar creecros commented on August 27, 2024

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.

creecros avatar creecros commented on August 27, 2024

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.

creecros avatar creecros commented on August 27, 2024

@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.

githubetc avatar githubetc commented on August 27, 2024

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.

creecros avatar creecros commented on August 27, 2024

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.

githubetc avatar githubetc commented on August 27, 2024

I have donated US$200 via the donate button (it went through paypal).
Thanks for your help with this.

from metamagik.

creecros avatar creecros commented on August 27, 2024

@githubetc

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.

creecros avatar creecros commented on August 27, 2024

Also, i appreciate the donation, Thank you!

from metamagik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.