Strapi Dynamic Component - group by selected categories - group-by

I'm trying to build a strapi component which would render items grouped by category. What I actually try:
Having Meals grouped by different categories I want to have a list as it follows:
MealCategory_1:
- Meal1
- Meal2
MealCategory_2:
- Meal1
- Meal4
- Meal5
So for now I have a component where I can select multiple Categories which should fetch related meals
What should I override in controller to have the desired result?

Related

Sails js - ordering form list

How would one create a "list" on an order form page that items could be added to when they are added to an order.
Example: I have a dropdown box with a list of items I pick an item and add it to an order form when I just have to set the qty after it is added.

How to count the selected categories or converting the selected categories into a string array

since I am not able to post an image. I'll just type the row for the categories. So here is it:
Categories
1-4-5-10-13-27-28-29-34-35-36-51-58-59-60-61-150
1-4-5-10-13-27-28-29-32-34-35-36-51-58-150
this categories are displayed in a grid
i would like to count how many categories where selected by the user. How would that be possible.
I am doing this because I want the selected categories to be in the selected side in the DualListField
Get the selection model either from the fromView or the toView. Then retrieve the selected items from this model.

Copy Field contents from one Table to another table - FileMaker

I am new to Filemaker pro. I am working with Filemaker pro 13.
My database contains 3 tables:
category (fields = _pkCatID & CatName)
subcategory (fields = _pkSubcatID , _fkCatID & SubcatName)
books (many fields including _fkSubcatID)
I have no problems in conditional value lists, so making two popup menus in books layout for categories and subcategories was successful.
But I want to put both categories and subcategories in one menu/sub-menu using 2empowerfm Menu Popper plugin.
I created a new field in subcategory table to store a calculation to be used in the value list of the plugin.
The calculation is = CatName & ">" & SubcatName & ";" & _pkSubcatID .
So the returned value when choosing in books layout will be "_pkSubcatID".
The problem is CatName is not in Subcategory table, and if I choose it from the related table Category, I can't make the calculation "stored" which is a requirement to use a field in a value list.
So, I need to copy the field CatName from category table to a new created field in subcategory table. I don't know how to do it.
You just need to create a lookup field in your subcat table pointed to the category name in the category table.
Create a field in the sub-cat table called "Category"
Click on Options
Auto-Enter Tab at the bottom, check "Looked-up value"
Select the correct starting (subcat) and related (Cat) tables and select the name field for the Category.
That is all.
To populate this for existing records click into the _fkCatID field on a subcat layout after showing all records and in the menus select Records->Relookup Field Contents
#Michael Wallace answer is correct and that solution should work.
I'd add however that if the table is likely to become large (and it could do if you're cataloguing books for a library) then I'd suggest you run some tests on a fake large data to see if this menu technique holds up (especially if you are serving over a network). Running two global search fields with an executeSQL lookup for subcategory within category would be more efficient in a big data set - this technique is well described here and other places:
http://forums.filemaker.com/posts/c4ed6f9923

Filemaker Pro 13 - Filtered Drop-Down field

Our factory rates employees by using 5 ranks:
rank1 - Uncertified
rank2 - Certified
rank3 - Instructor
rank4 - Master Instructor
rank5 - Supervisor
I want to have a layout where 3 fields need to be shown:
1) First field - Drop-down list which shows only employees with rank1
2) Second field - Drop-down list which shows only employees with either rank3 or rank4
3) Third field - Drop-down list which shows only employees with rank5
I don't know how to make each field conditional using the above conditions
I have set up 3 tables:
rank: _pkRankID, RankName
employee: _pkEmpID, EmpFname, EmpLname, _fkRankID
trackingform: _pkFormID, FormDate FormComments, FormRating, _fkEmpID
I am getting very frustrated trying to figure out what fields to use and how to set up a conditional statement. I either get a ? or a 0 (zero) or nothing in my Drop-down box.
Could someone walk me through step-by-step how to do this please?
Based on your description, I put together a sample file that accomplishes this.
It involves:
Creating several global fields, corresponding to the appropriate rank ID
Create several Table Occurrences on the Relationship Graph, with relationships based on the global fields
Create several value lists, which pull from the Table Occurrences you created
You can download the sample file at http://cris.lc/pcuf4

Is there any function convert Extjs4 root tree node to button group?

I am not sure what i want is existing yet. I am using Extjs4+.
So i want convert bellow tree to group button [Students(drop down menu),Teachers (drop down menu),Staff (drop down menu)] i want something like Microsoft word menu.
Current tree:
- Students
- Student List
- Student Absence List
- Teachers
- Teacher List
- Teacher Absence List
- Staff
- Staff List
- Staff Absence List
//Three data respond from server with Json.