TACTIC Open Source
search keys can't work in SObjectChartWdg - Printable Version

+- TACTIC Open Source (http://forum.southpawtech.com)
+-- Forum: TACTIC Open Source (http://forum.southpawtech.com/forumdisplay.php?fid=3)
+--- Forum: TACTIC Discussion (http://forum.southpawtech.com/forumdisplay.php?fid=4)
+--- Thread: search keys can't work in SObjectChartWdg (/showthread.php?tid=12)



search keys can't work in SObjectChartWdg - EricTsuei - 10-12-2019

I am creating a custom Layout using SObjectChartWdg. 
using tactic 4.5

code is:
<element>
  <display class="tactic.ui.chart.SObjectChartWdg">
    <search_type>production_management/main_page</search_type>
    <title>test budget</title>
    <x_axis>name</x_axis>
    <elements>budget</elements>
    <search_keys>"production_management/main_page?project=test"</search_keys>
  </display>
</element>


search keys report some error:
Reported Error: "do_query error: SELECT "production_management"."public"."spt_trigger".* FROM "production_management"."public"."spt_trigger" LIMIT 0 "

and x_axis can't work too, still shows the code. 


RE: search keys can't work in SObjectChartWdg - listy - 10-12-2019

Search Keys should look like sthpw/task?code=TASK00000 etc, with Code.
May be just use expression?
...
<expression>@SOBJECT(sthpw/login)</expression>
<x_axis>login</x_axis>
<y_axis>{@SUM(@GET(loginConfusedthpw/snapshot.sthpw/file.st_size))/1024/1024}</y_axis>
...


RE: search keys can't work in SObjectChartWdg - EricTsuei - 10-14-2019

thank for your reply .
but I find x_axis can't show the column that I input "project", still shows the code for the sType.
please see the attachment


RE: search keys can't work in SObjectChartWdg - listy - 10-14-2019

(10-14-2019, 07:25 AM)EricTsuei Wrote: thank for your reply .
but I find x_axis can't show the column that I input "project", still shows the code for the sType.
please see the attachment
if you have prject column in production_management/main_page, you can add this:

<expression>@SOBJECT(production_management/main_page)</expression>
<x_axis>project</x_axis>



RE: search keys can't work in SObjectChartWdg - EricTsuei - 10-14-2019

thanks, but it's still not showing the project column.
please see attach


RE: search keys can't work in SObjectChartWdg - EricTsuei - 10-15-2019

I have edit the source py file in:

C:\Program Files\Southpaw\tactic\src\tactic\ui\chart\sobject_chart_wdg.py

in line 288

original:
chart_labels.append( sobject.get_code() ) 
to this:
chart_labels.append( sobject.get_value(my.x_axis))

seems x_axis display correctly.
please see the attachment.
I don't know I am doing the right thing or not. please tell me.


RE: search keys can't work in SObjectChartWdg - EricTsuei - 10-15-2019

but I still have problems.

about the expression, 
<y_axis>{@SUM(@GET(production_management/main_page.budget))}</y_axis>
<x_axis>project</x_axis>

in my thought, this code should display as,  use the 'project' to sum the total of the budgets. display each project 's total budgets.
but it's not. please see attachment, it just display each of the datas. not combine them.


RE: search keys can't work in SObjectChartWdg - listy - 10-15-2019

It would be less complicated if i know your project structure or production_management/main_page stype.
Does it multi project stype? Or porject is just column that you filling yourself?


RE: search keys can't work in SObjectChartWdg - EricTsuei - 10-16-2019

project is just a column in this page