0

Choice (dynamic) as view filter

I have a dynamic field that uses the following script:

 

record(Category,number(Category)).Subcategory order by Name

 

For data entry, this works great. I now want to filter a view by Category, then Subcategory. Note that Category is also a Choice (dynamic) field. The filter for Category shows me its dynamic list; however, the Subcategory list is always empty:

 

I can appreciate the complexity of implementing this in Ninox, but I thought it worth asking, is it possible to use dynamic fields (that rely on other dynamic fields) as filters in a view? For now, I'm combining the text of the two dynamic choice fields and then I filter on that; however, this becomes more difficult (verbose) when filtering for multiple sub-categories.

5 replies

null
    • Kevin
    • 2 yrs ago
    • Reported - view

    Not sure why the image didn't upload. Attempt #2

     

    Dynamic-Field-Filter

    • Kevin
    • 2 yrs ago
    • Reported - view

    Thanks Steven. Where can I find the "EN Team Webinar" that has this example?

    • Fred
    • 2 yrs ago
    • Reported - view

    Hi Kevin -

     

    You ask for access to the Webinar EN 2021 team by emailing support@ninox.com.

     

    I think your question will not be solved by a cascading DMC fields.

     

    I was playing around and encountered the same issue you described. It seems like Ninox can not in a table view, show the choices in a dynamic choice fields that is dependent on another field.

     

    Try this, create another dynamic choice field, call it test1.

     

    In Dynamic Values put: select Category

     

    In Dynamic value name: Subcategory

     

    Now add that field to your view and now try to filter it. It should you all the subcatgories that are in every record in your Category table, duplicates and all. Which is not exactly what you probably want, but I can't think of a fix for that. Maybe someone smarter can figure it out.

     

    You can also email support to see if this is even possible.

    • Alain_Fontaine
    • 2 yrs ago
    • Reported - view

    Are you trying to show filtered records from the "Entry" table in some kind of Dashboard table? Another option is to fiddle with the formula used to fill the view. In the table hosting the view, you can add the same dynamic choice fields "Category" and "Subcategory" as in the "Entry" table. Just add, in the "Trigger after update" of the "Category" field, the statement:

    Subcategory := null

    Then fill the view with:

    let c := Category;
    let s := Subcategory;
    (select Entry)[Category = c and (s = null or Subcategory = s)]

    Does it give the result you want?

Content aside

  • 2 yrs agoLast active
  • 5Replies
  • 698Views