Hi
I am finding it necessary to use the Custom rather than Table view for a Connectivity job. I need to add a sortable column. Looking at a simple connection - MasterConstants - I see that the link references a Chronoform 5 of the same name as the connection.
I have not created that form - it does not exist.
I tried to just cut, paste and modify that code to suit my 'target' connection but it crashes as it ca;t find the form.
Long and short of it - how do i add a sortable column to a custom connection?
Regards
Nick
I am finding it necessary to use the Custom rather than Table view for a Connectivity job. I need to add a sortable column. Looking at a simple connection - MasterConstants - I see that the link references a Chronoform 5 of the same name as the connection.
http://www.devj3c201.pmhu3a.org.au/chronoformsv5/master-contants?act=index&orderfld=mdlMaster.decCost&orderdrc=asc
I have not created that form - it does not exist.
I tried to just cut, paste and modify that code to suit my 'target' connection but it crashes as it ca;t find the form.
Long and short of it - how do i add a sortable column to a custom connection?
Regards
Nick
Hi Nick,
Can you not add the column to the Sortables box - I thought that still worked in a Custom listing?
Bob
Can you not add the column to the Sortables box - I thought that still worked in a Custom listing?
Bob
Hi Bob
Lord I left that a long time to reply. It would appear not. I have added the name="fltr[mdlListMbrReceipts][paidBy]" to the header but am looking for an equivalent sort version.
Nick
Lord I left that a long time to reply. It would appear not. I have added the name="fltr[mdlListMbrReceipts][paidBy]" to the header but am looking for an equivalent sort version.
Nick
Hi Bob
I didn't make that clear did I? Yes - I have a column in the sortables box but no good. I have the same situation with two different connections.
Nick
I didn't make that clear did I? Yes - I have a column in the sortables box but no good. I have the same situation with two different connections.
Nick
Hi Nick,
If you have Model.field in the columns list, and Model.field in the sortable box, then {Model.field} in the header code would display a sortable link
Regards,
Max
If you have Model.field in the columns list, and Model.field in the sortable box, then {Model.field} in the header code would display a sortable link
Regards,
Max
Hi Max
Following on from that - can one use the same syntax and function for other fields/function? For example, if I use a field {mdlListCourseReceipts.accountPaid} in a custom table
and the accompanying HTML
plus the binary field . Should that toggle the field?
It doesn't and before i go chase my error i thought that I would just ask.😲
Nick
Following on from that - can one use the same syntax and function for other fields/function? For example, if I use a field {mdlListCourseReceipts.accountPaid} in a custom table
<td class='njjoCenter'>{mdlListCourseReceipts.accountPaid}</td>
and the accompanying HTML
mdlListCourseReceipts.accountPaid:array('Yes'=>"<I class='fa fa-check'></i>",'No'=>"<I class='fa fa-times'></i>")
plus the binary field . Should that toggle the field?
It doesn't and before i go chase my error i thought that I would just ask.😲
Nick
Hi Nick,
The HTML box will override the output of all boxes, so if you set your field there then its useless to have it in any other box.
Also, the binary field should have either 0 or 1, nothing else.
What you can do is to use the HTML box but build the links to the "toggle" action yourself, the toggle action accepts a "val" parameter which specifies the new value to be set when the action is executed, just test this with a binary field and you can find out how it works!
Regards,
Max
The HTML box will override the output of all boxes, so if you set your field there then its useless to have it in any other box.
Also, the binary field should have either 0 or 1, nothing else.
What you can do is to use the HTML box but build the links to the "toggle" action yourself, the toggle action accepts a "val" parameter which specifies the new value to be set when the action is executed, just test this with a binary field and you can find out how it works!
Regards,
Max
Hi Max
Progress - I have the binary toggle nearly working. I thought I would start there.
and that same field in the binary box. I have all permissions set for the user.
The toggle
clearly works but I am getting an "Update Failed' Message every time I try the update. (I noticed that Kaspersky anti-banner but no different if I disable that)
Is there some way of checking the update SQL or debugging that? Or have I missed something basic?
Regards
Nick
Progress - I have the binary toggle nearly working. I thought I would start there.
<td class='njjoCenter'>{mdlListCourseReceipts.accountPaid}</td>
and that same field in the binary box. I have all permissions set for the user.
The toggle
a href="/index.php?option=com_chronoconnectivity5&cont=lists&act=toggle&ccname=lisCourseReceiptsPick&gcb={mdlListCourseReceipts.}&val=0&fld=accountPaid&model=mdlListCourseReceipts&Itemid=390">
<img src="http://www.devj3c105.pmhu3a.org.au/libraries/cegcore/assets/images/enabled.png" kasperskylab_antibanner="on">
</a>
clearly works but I am getting an "Update Failed' Message every time I try the update. (I noticed that Kaspersky anti-banner but no different if I disable that)
Is there some way of checking the update SQL or debugging that? Or have I missed something basic?
Regards
Nick
Further to
Can you point me to an example of setting up this toggle action, please?
Or do you mean I should include code like that generated in the toggle action as per example above?
That is
Thanks again
Nick
What you can do is to use the HTML box but build the links to the "toggle" action yourself, the toggle action accepts a "val" parameter which specifies the new value to be set when the action is executed, just test this with a binary field and you can find out how it works!
Can you point me to an example of setting up this toggle action, please?
Or do you mean I should include code like that generated in the toggle action as per example above?
That is
<a href="/index.php?option=com_chronoconnectivity5&cont=lists&act=toggle&ccname=lisCourseReceiptsPick&gcb={mdlListCourseReceipts.}&val=0&fld=accountPaid&model=mdlListCourseReceipts&Itemid=390"><img src="http://www.devj3c105.pmhu3a.org.au/libraries/cegcore/assets/images/enabled.png" kasperskylab_antibanner="on"></a>
Thanks again
Nick
Your link has a missing part:
You didn't add the pkey here, please check the final link and if it has all the required parameters.
Regards,
Max
gcb={mdlListCourseReceipts.}
You didn't add the pkey here, please check the final link and if it has all the required parameters.
Regards,
Max
Hi Max
I have run it and copied it again. This is the generated code from the toggle box - not code that i wrote. Code generated using your 'tutorial' as a model.
Here it is again and that gcb= is there
ccname=lisCourseReceiptsPickToggle&gcb={mdlListCourseReceipts.}&val=0
Puzzled.
:?
Nick
I have run it and copied it again. This is the generated code from the toggle box - not code that i wrote. Code generated using your 'tutorial' as a model.
Here it is again and that gcb= is there
ccname=lisCourseReceiptsPickToggle&gcb={mdlListCourseReceipts.}&val=0
<a href="/index.php?option=com_chronoconnectivity5&cont=lists&act=toggle&ccname=lisCourseReceiptsPickToggle&gcb={mdlListCourseReceipts.}&val=0&fld=accountPaid&model=mdlListCourseReceipts&Itemid=448"><img src="http://www.devj3c105.pmhu3a.org.au/libraries/cegcore/assets/images/enabled.png" kasperskylab_antibanner="on"></a>
Puzzled.
:?
Nick
Hi Max
A sudden brain wave. I was using a view rather than using the underlying table. I was doing that to derive local dates with mySQL rather than PHP. It struck me that the view would probably not then know of the primary key value. So I switched from the view to the table and Eureka! all sorted. An easy fix to one of those 50 50 choices that is always wrong!
:mrgreen: :mrgreen:
Nick
A sudden brain wave. I was using a view rather than using the underlying table. I was doing that to derive local dates with mySQL rather than PHP. It struck me that the view would probably not then know of the primary key value. So I switched from the view to the table and Eureka! all sorted. An easy fix to one of those 50 50 choices that is always wrong!
:mrgreen: :mrgreen:
Nick
Great news!🙂
This topic is locked and no more replies can be posted.
