How can I sort and map my SQL query in Ionic? - database

I have a database running in the background, the aim of the whole thing should be that I have categories as buttons and that categories should be created under elements. I separated the whole thing in the database (i.e. in two tables), i.e. in categories and in the sub-elements. I get everything correctly selected but just don't know how to assign or build it. Does anyone have any ideas or examples to look at?
I've already tried Ionic's list system. Just like ion-record.

Related

Automatic Grouping/Sorting of Nested-Lists?

I am currently trying to implement a web tool with a capable web developer, but we are stuck on one functionality.
It's about draggable nested lists, which should be grouped and sorted automatically according to different attributes.
The "draggable" is not the problem but the automatic creation of parent & child nested lists and the automatic distribution of the products into the corresponding lists.
For a better understanding I have made a
Figma-Prototype, maybe you will understand what I mean.
I have a database of products with attributes like "producer", "product category", "sub-category", "country" and "region". (However the example is just a table, in reality we made the DB in MongoDB)
I want the user to be able to change the order (drag&drop) and also create new lists(Nested-List Parents & Childrens). However, I would like to spare the Users from having to start at 0 and create and fill all lists manually, for example, when it its just about grouping and sorting "only" by product category.
Is this even Possible? We are working with React (MERT-stack).
Thank you!!
We havent an idea where to start, tbh.

Automation script for website in loop

Below is the screenshot of the web pages, I need to write a script that add the product automatically, suppose 15 times.
I achieved this for one single entry but i need to write it in a loop.
Challenge here is that i need to select different categories based on which there are different sub-categories and based on sub-categories there are different sub-sub-category so can anyone suggest how to achieve this.
If the fields and dropdown itself don't change you can create some kind of collection for each of the category options and sub options. Then with some mapping from one category to other you can achieve this.
Eg. CategoryArray will have [Item1, Item2, Item2] selection of this choice will guide which subcategory array you will access like Item1SubCategoryArray then so on and so forth.

Issues on a select with AngularJS and Google Spreadsheet

I want to create a small web app which would display a list of movies, with a Google spreadsheet set as a database. So far, I was able to connect my spreadsheet to my app and I also added some filters to it. (As a side note, this thread really helped me in the process.)
Here is a very simplified version of my app: http://plnkr.co/edit/BtbSCVOh7KJsMHjANxMP?p=preview
I still have 3 problems with my <select>, which I can't fix despite trying for hours:
I can't sort my <options> alphabetically. Trying with orderBy didn't return anything.
I can't figure out a way to split my categories when there are more than one for a movie.
If the "categorie" field in my spreadsheet is empty, it will return a blank <option> which I would like to remove or hide.
My guess is that I'll need to update my function one way or another, but I'm a bit lost at the moment.
Any help on this would be really appreciated!

Dynamically disabling menu based on database query?

So I'm not a programmer, but my friend is. He's trying to help me develop a web/phone app but we are stuck because I'm having trouble communicating to him an idea and he is having trouble understanding. One or both of us is a moron ;) Part of the problem is that I don't even know where to search for the answer cuz I don't know the specific search terms...believe me I've tried...and I've searched stack overflow as well. Here is the problem:
Short Question:
Websites (like hotel search) allow you to search for rooms by selecting checkboxes in certain categories (i.e. smoking/nonsmoking, stars, size of bed, near downtown, etc.). Certainly these sites are referencing a large database of hotels in a city.
How can you create a site so that as you check boxes (narrow your search), other options which are no longer available are dynamically "grayed out" or disabled on the fly so you cannot check those boxes. So if I were to check 4 stars and that excluded all smoking rooms based on the database, then the option to check "smoking" would be disabled.
The key to this is that the site is querying a database as you click boxes, then based on the results of that query (which is presumably many rows of data (a subset)), it is analysing that subset of data to determine whether checkbox options should be on/off, then dynamically "graying out" specific options that are no longer available. Once you got to only a single possible result, then the site would pop up the website for that hotel (or some other action).
What is this called? Where can I get more information on this. Any pointing toward the right direction would be tremendously appreciated.
Thanks so much in advance!
Roy
HERE IS AN EDIT TO ORIGINAL QUESTION...HERE IS AN EXAMPLE:
So here is my sample database. Each Column (i.e. AA, AB, AC) represents a checkbox. '1'= True, '0'= False, and '2'= Either. Therefore, if you click checkbox AA, then only the top three rows would meet the criteria of AA=True. So query would return the top three rows. The '2's could be either True/False so since they don't affect outcome, those checkboxes should be disabled and only the checkboxes CA,CB, & CC should remain choosable. If you then click checkbox CB, then result ZYX would be output.
Conceptually, How do you go from the initial click to the point where the database is queried and the results are used to dynamically change the menu. People have suggested javascript but i am not looking for a language. I am more looking for the concept. I was thinking that the query would return a new "temp" array with just the top three rows. Then each column of this "temp" array would be queried to see if it contained a '1' in any of the rows. If it did, then that button would be turned "ON". If it didn't then that button would be turned "OFF". Is this confusing? Am I asking for too much ;)
This sounds like javascript could help. For example, using jQuery, you can dynamically send queries to databases based on whatever you click on checkboxes, and then reload a particular section of the webpage. Javascript can also dynamically disable checkboxes.

Show custom object in related list under page layout

I have been trying this whole day but cant figure out... I have custom object called Dev which has many to many relationship with Accounts... I want this object Dev to show under related list of page layout of account... But it is not showing there how can i add that to related list?
Assuming you have a lookup relation from Account to Dev and also a lookup from Dev to Account (creating your many-to-many), then this will work fine.
Try re-creating your lookup relationship from Account to Dev. Then make sure that you add the related list and add to the page layouts in steps 5 & 6:
Step 5. Add reference field to Page Layouts (Yes to All)
Step 6. Add custom related lists (Yes)
That's all you need. If, however, your many-to-many relationship is unique or otherwise configured differently (with a junction table, for example) then the above may not work for you.
We always tend to use joining objects for these relationships, obviously you can show the list of joining objects as a related list, and you could display other fields from the dev object by use of formulae.
One thing we've tended to do is create an inline VF page which can then show all of the objects related to the current record.

Resources