i need to retrevie fileld name as variable
example
.......tables&act=chart&table_name=os5pk_chronoforms_data_fffff&field=text1
here i can take field name as a variable
with this i want to serach things with dropdown selection
lets say
marketing has 1 to 4 values
accounting has 1 to 4 values
wheen i select marketing from dropdown i can list only marketing course
so marketing column to retreive in database
example
.......tables&act=chart&table_name=os5pk_chronoforms_data_fffff&field=text1
here i can take field name as a variable
with this i want to serach things with dropdown selection
lets say
marketing has 1 to 4 values
accounting has 1 to 4 values
wheen i select marketing from dropdown i can list only marketing course
so marketing column to retreive in database
In your case it would be {data:field}
.......tables&act=chart&table_name=os5pk_chronoforms_data_fffff&field=text1In THAT case that you posted, to get the value of "field" you would use {data:field}
no this is an example i saw on chronoforms when you click chart icon on tables
it show istatistics based on selected field name
i mean it looks like doable
i just want to know how to do this
it show istatistics based on selected field name
i mean it looks like doable
i just want to know how to do this
In WHERE conditions:
The /- at the end means "if formfieldname doesn't exist, ignore the condition and move on"
databasefieldname:{data:formfieldname}/-NOT in "fields to retrieve".
The /- at the end means "if formfieldname doesn't exist, ignore the condition and move on"
in your way it returns values of text1

But this is not what i want
i want this
lets say text1 is a dropdown inside value a and b
table
a b
4 5
2 4
2 5
select {data:text1}, count({data:text1} from table x group by {data:text1}
i mean i want field name as variable not the value
if user select a group a column
if user select b group b column

But this is not what i want
i want this
lets say text1 is a dropdown inside value a and b
table
a b
4 5
2 4
2 5
select {data:text1}, count({data:text1} from table x group by {data:text1}
i mean i want field name as variable not the value
if user select a group a column
if user select b group b column
Sorry don't think it works that way. Just retrieve all the fields the performance hit is negligible.
To pick a particular field out of the returned array you'll need to use PHP, something along the lines of (for "return first matching")
To pick a particular field out of the returned array you'll need to use PHP, something along the lines of (for "return first matching")
$this->get("read_data#.model." . $this->data("field"))
This topic is locked and no more replies can be posted.