Certainly a stupid question but i do not figure out how to fill an array with predefined values like in this example:
I need to fill the array arr1 with three strings “ONE”, “TWO”,“THREE”.
It might better to enter it in the data bindings panel, eg:
Many thx @TomD, it works perfectly.
Tom,
How do i read/query array value(id) such as 1,2,3,4,5 from a database to its corresponding text value e.g progress, pending, resolved etc.
Thanks
Bankym, i may help you if you give some more precision about what you aim to do.
I suppose that you store the status “Progress, Pending etc…” in a table and in a INTERGER field.
For exemple 1=progress, 2=Pending etc … ?
I suppose that you want to display in a table a list of things (maybe orders, or ticket support or anything else) with a column for Status ?
Exactly, “I suppose that you store the status “Progress, Pending etc…” in a table and in a INTERGER field. For exemple 1=progress, 2=Pending etc …”…so when i query/read it, i want to get the actual text to display instead of the ids.
Here is my approach…
- Create an array
- Fill the array in ARRAY PROPERTIES
Go in “the Data Binding” and then click on “code” and finally fill the array with your different status in the rigth order.
ie: [“None”,“progress”,“Pending”,…] - Now, in you table (maybe a bootstrap table), go to the cell properties corresponding to the column “status”, go to “DYNAMIC ATTRIBUTES”->Select “Inner Text”
and fill like this in the code:
“array_displaytypes” is the name of my previous array
“display_1” is the name of the field in my server connection.
Hope it helps.
It does help. Thank you.