0

choice values from table?

Hi,

is it possible to create a multiple choice field where the choice values refer to another table. In my case I want to add multiple keywords (which could be easily done with a multiple choice field) from a controlled vocabulary (which could be best controlled in a table). For now, if I want to use the multiple choice field I would have to add all the keywords from the rather large controlled vocabulary by hand. Direct table references do not appear as an option here, since I need to be able to add multiple keywords. Any ideas?

12 replies

null
    • Mconneen
    • 5 yrs ago
    • Reported - view

    Not using the mulitple choice "field" type.  You would need to create a relationship between two tables. 

    • joh85
    • 5 yrs ago
    • Reported - view

    Thanks for the reply! If you mean simple references between two tables, I don't see how I could relate one record from table 1 to multiple keywords from table 2. Or do I overlook something essential here?

    • Mconneen
    • 5 yrs ago
    • Reported - view

    Are you looking for something like this?  Master Row in Table 1 linked to multiple keywords ? 

    keyword

    Create an association table between Table 1 and Keywords. 

    dataModel

    • joh85
    • 5 yrs ago
    • Reported - view

    Yes, that looks very much like it! Could you share a link so I can have a more detailed look on how it's built? Thanks!

    • Mconneen
    • 5 yrs ago
    • Reported - view
    • joh85
    • 5 yrs ago
    • Reported - view

    Thanks! That is surely helpful. The only thing then is, that the Keywords only appear in Form view of Table 1, so there is no way to search for the keywords. As far as I know one can only query data that appears in table view – but the column "Keyword Association" of table1 for some reason can't be included. (Although it appears as one of the "available columns" when I want to edit the columns - it just isn't clickable.) But if I can't display all entrys of table 1 that are tagged with a specific keyword this makes the keyword kind of useless for my purposes. Is there a way to display the keywords in a normal table view?

    • Mconneen
    • 5 yrs ago
    • Reported - view

    I am not following 100%...  Here is a "view" that searches by key word and display's the Table 1 row text.. 

    keywordSearch

    theView

    • Mconneen
    • 5 yrs ago
    • Reported - view

    You can also configure the Keyword Association view on the Keyword table to show the Table 1 text. 

    keyword

    To populate the Table 1 row with "Keyword" .. .you can also add a search of the keyword table and populate build the keyword association via code snippet in an after update trigger..   There are other threads in this forum that outline that approach.. 

    • joh85
    • 5 yrs ago
    • Reported - view

    Thanks again! But this is not quite what I am looking for. Maybe I should explain the context: My Table1 would contain many, many film titles and a lot of filmographic data. I then have a rather long list of index terms or keywords and I want to be able

    1) to make connections between one film title and multiple index terms,

    2) to manage my keywords within a table,

    3) to search for a specific index term and get a search result in form of a table view that displays all the columns of table1, so I can at a glance compare most of the filmographic data of all titles that are linked to one specific key word. Ideally, I would be also able to combine this with filters in other columns.

    As far as I understand this, 1) and 3) are made possible very easy by using a simple "multiple choice field" in the form of Table1. Apparently it is not possible to draw the choive values of such a field from another table, so I can't do 2) then. This would mean I would have to enter all my keywords by hand as choice values of the multiple choice field.

    The solutions you suggested only fulfill 2), but I can't see how to achieve 3) then. It appears to me as if only a very small part of the information of table1 can be displayed in case of a keyword search, namely only the data that overlaps in table1 and "Keyword Association"; in your example this is the content of the column "Text" of "Table1", in my case this would be the mere titles, but not all the filmographic data that I would need to compare.

    • Mconneen
    • 5 yrs ago
    • Reported - view

    @joh85

    For #1 above... there is a more elegant / user friendly way to make these connections other than they way I displayed (which is pretty much "out of the box").   You still have to add them one by one.. but it is pretty easy.. See this thread for an excellent discussion  with a few lines of code.. it is very easy.... 
    https://ninoxdb.de/en/forum/technical-help-5ab8fe445fe2b42b7dd39ee7/search-bar-with-button-5b74ecfd9efc8227533e7d42

    For #2.. Yes assuming you are going you have hundreds of keywords / index words in a spreadsheet.. You can import those into a table to manage... and then tag to each film using the approach described in #1 above.  You still will have to add them keyword by keyword.. ..  but I only know that one requirement.. manage a single list..   I suspect your "keywords" may actually have some sort of hierarchy.. 

    For #3.. you are on the right track... you can either use a view as I previously displayed ... and add numerous columns.. which I suggest its not user friendly.. or you can create multiple table views on the Keyword Association Table and filter by Keyword.   For each desired view.. click on a header row, then select "Show Column".. If you want to see more of "Table 1"'s columns.. click on Table 1.. and add it's columns. 

    assocFilter

    assocShowCol

    assocTable1

    assocTable1A

    Once you have #1 working the way you like it... and #3 somewhat configured with a view or two...   You may find it annoying to keep right clicking and manipulating the keyword filter...  SOOO.. the next iteration will be to add a "In Scop" formula field that references the "Search Keyword" table/form .. and returns "true" if it is within view...  That is a bit more code .. and a bit more complex.. so tackle the above first.. then we can start a different forum thread to gather ideas on how other's apply complex filtering.. or perhaps see if Julian or NinuxUS have a prebuilt tutorial / webinar on complex filtering / data visualization techniques.. :) 

    • yinapps.com
    • drew
    • 5 yrs ago
    • Reported - view

    I think fundamentally, ninox needs an augmented choice field that derives its source from a data select string, and returns 1 or many Id's of selected records.  This will enable many nuanced workflows.

    • yinapps.com
    • drew
    • 4 yrs ago
    • Reported - view

    ....funny, it is now 11 months later, and i return to Ninox to give it another shot, and run into the same basic issue that fundamentally makes me cringe.  Case in point: designing a data-driven accounting system, embedding system knowledge into tables (as ninox doesn't truly support any global value structs), whereby i can define GL Type as Debit=1, Credit=-1 to allow for easy and automatic table-level signed summation enhancements and NOT have to redefine this at various points.  I could then assign one field to this table (of two records), and *wishfully* have it display as a dropdown-based CHOICE, which would store the value field in each accordingly.  

    For now, back to hacking what should be centralized, into various screens.

Content aside

  • 4 yrs agoLast active
  • 12Replies
  • 6498Views