You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've so far built filter_codes to take a list of options, which are built for docassemble's choice tuples, each item in the list being a Tuple of the stored value if a choice is shown, and the next is the value shown to the user. This allows users to filter which codes they want to auto select for the user (i.e. the user has already chosen themselves by starting this specific interview, like filing type and case category, etc.) based on the either the Code or the code's human readable name.
It's slightly more powerful to instead filter on the full map object, which maps from the code to the full code object, with each of the specific attributes. This is slightly more powerful, but more difficult to design, since any code can have any attribute (which do you filter first, and which take priority?) Most importantly though, we can end up with exact duplicates, meaning the court has messed up their codes, and there's no practical difference between the different code except the number itself. In that case, filtering by map, we can just consistently choose the first option, and avoid showing the user a very confusing screen, asking them to select between two identical options.
The text was updated successfully, but these errors were encountered:
I've so far built
filter_codes
to take a list of options, which are built for docassemble's choice tuples, each item in the list being a Tuple of the stored value if a choice is shown, and the next is the value shown to the user. This allows users to filter which codes they want to auto select for the user (i.e. the user has already chosen themselves by starting this specific interview, like filing type and case category, etc.) based on the either the Code or the code's human readable name.It's slightly more powerful to instead filter on the full map object, which maps from the code to the full code object, with each of the specific attributes. This is slightly more powerful, but more difficult to design, since any code can have any attribute (which do you filter first, and which take priority?) Most importantly though, we can end up with exact duplicates, meaning the court has messed up their codes, and there's no practical difference between the different code except the number itself. In that case, filtering by map, we can just consistently choose the first option, and avoid showing the user a very confusing screen, asking them to select between two identical options.
The text was updated successfully, but these errors were encountered: