From a MySQL database results, on the client-side I want to be able to add 1 additional category on the results table based on the database results.
Example: MySQL data “happy”, “glad”, “euphoric” become linked to a the client-side category of “Happiness.” MySQL data “sad”, “sadness”, “gloom” become linked to a the client-side category of “Depression.”
TABLE results example:
Mood State — Mood Category (client-side generated)
Left column for the MySQL results (e.g., “beer”, “whisky”, “tequila”).
Right column with the client-side generated category for each left column result, in this case “Alcoholic Beverage” category. The “Alcoholic Beverage” category does not exist on the MySQL database, and I want to be able to dynamically create the category on the client-side of the web page for each individual result of the MySQL data.
So do you just want to replace some records with with category1 then some other records with category2 etc. in a repeat region?
For example instead of showing:
You need to use the Group By Data Formatter for this, so 4 states of Happiness are all grouped as Happiness and 20 states of depression are grouped together as sadness.
Yup, you are right, Grouping is not going to work without all the data in the database, cant use grouping when some data is from the database and other data is generated Client Side, sorry @jcr I did not think of that.
I duplicated the cell with the data bindings and the “replace” feature worked well. How can I “replace with” the whole database text string based on a partial “search for”?
Example:
Database text: “extremely depressed”
“Search for” depressed
“Replace with” Depression
Text showing on webpage: extremely Depression
I need to be able to remove the whole text string with my “replace with” text.
Also, if my “search for” (e.g., depressed) does not appear on the database records, I need to be able to show a blank field on the webpage instead.
Granted, I may need to just add an extra table to the MySQL database but with 80K+ records and the eventual need to update the database with a clean updated install, I am just dreading all the errors I may cause to the new install, because the records sequence will be different on the new install.