XML Data in Database

JohnLF

New Member
Hi,
Just new to Fabrik and was trying to figure out if it could do what I wanted. There is a field "textarea" in a table with key/value pairs like

Code:
field_speaker="John" field_hours="1234"

Is it possible to extract the value for the key = field_hours so I get 1234 displayed in a list?
Thanks
 
You can set whether any element is shown in a fabrik list in one of 2 ways...
In the 'Element' configuration for the group, locate the element in the list and click the 'Show in List' option on the far right to toggle list display on/off. Or open the element for editing and under 'List view settings' click 'Show in list'.
 
Hi Bauer, Thanks for the reply. I can display the db field ok however the contents of the field are
Code:
field_speaker="John" field_hours="1234"
and was hoping to parse out the key/value pairs so I could display the value for the key " field_hours" .i.e. display "1234" in the list.

Is this possible somehow?
Thanks
 
I'm lost. Why are you storing those values in a textarea? Why not just add 'field_hours' as another element/field in whatever table is holding field_speaker="john"? Or are there no tables at all that contain either of them?

In that case change that textarea to a normal fabrik field (text) and rename it to 'field_speaker' - then create another field (text) element in that same table named 'field_hours'. Then they each have their own row in the list.

I have a feeling I'm missing something here.o_O
 
The field/textarea is part of an existing table and I was hoping to use the value within Fabrik somehow...:)
 
You can add a calculation element (if you can add a column to the existing table) doing some string/xml handling.
Or you can create a custom list template for doing this.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top