iterative link with json field
iterative link with json field

Hello, I have a problem. Here is the concept.
a structure file allows in ajax to define the editor fields and the datatable columns and to write the php data access file. the data file is composed of an id and a json where the data is stored.
In this json, there is not necessarily a label, the file can be linked to itself, for example:
id = 1
json = {"prop1": 2, "prop2": 124.56, "prop3": "Label of prop1"}
id = 2
json = {"prop2": 124.56, "prop3": "Label of prop2"}
here i want to display for id = 1 prop1, prop3 of id = 2.
I failed to create a join because of the json.
i have a php function, which brings back the correct wording except i dont know how to call it. i tried a bile :: inst ('libprop1 ") with a getFormatter, but the field not existing in the file, i have an error. I don't want to store this label, just display it. How to display data that is not in the datasource?
sorry for my poor English
This question has an accepted answers - jump to answer
Answers
A get formatter is the correct thing to do here (I think - I don't really get it to be honest!). Can you show me your get formatter and the error message? Also make sure you add
->set(false)
toField
s which you don't want to be editable.Allan
Hi Allan.
and xhr error
This is the libprop_2602 field. I am returning the displayed value from the datahead.json field for the prop_2602 property.
In any case, thank you for responding so quickly.
Ah I see - you want to call the field
libprop_2602
, but you don't want to get that from the database? UsegetValue()
for that:Allan
Thank you very much Allan. The complete solution is the combination of getvalue and getformatter