This commit is contained in:
2018-11-30 19:37:15 +00:00
parent 793695942e
commit 3bc821d074
6 changed files with 64 additions and 13 deletions

View File

@@ -7,16 +7,20 @@ User creates filters in separate UI from the actual list, i.e. clicks on the fil
Two types of filters Named or Default:
User can save a filter with a name for later selection or it will always default to "Default" (localized) if not edited but will always require saving to server.
Generic "default" filter is always personal, not public / shared
- This is a client issue, Server doesn't care what the filters are called adn has no special processing for default filters
Named filters can be made public or personal. If public then all users with rights to that object can see them, personal are always only personal.
Filter is constructed from an FILTEROPTIONS object fetched from the server list route that has a list type name which is unique to that list route
and also lists all the fields filterable, their type and the locale key to display it
- e.g.: {list:"widget",fields:[{fld:"name",lt:"WidgetName",type:"text"},{fld:"dollarAmount",lt:"WidgetDollarAmount",type:"currency"}]}
- e.g.: {ListKey:"widget",fields:[{fld:"name",lt:"WidgetName",type:"text"},{fld:"dollarAmount",lt:"WidgetDollarAmount",type:"currency"}]}
- List key
Certain types have extended abilities, for example dates have the classic floating AyaNova date ranges pre-defined or specific dates
Filters are saved to the database:
- Filter: Name, OwnerId, Public, ListKey, Filter (Json string)
- ListKey is always lower case to match biz object list key name
- Filter format:
- Array [{fld:"fieldname",op:"See filtercomparisonoperator class",value:"compareValue"},...] these are all AND in sql, no OR
- fld=name of field to filter by
- always all lower case
- Straight up field name like "name"
- Could be compound for joins like "table.name" (no a prepends the table name)
- Special indirect values such as "[TAGS]" which means cross filter with tags