Page 1 of 1

SortDataByKey

Posted: Wed Sep 17, 2014 12:58 pm
by link76
Hello,

I would like to filter my DG Form a column text (template row: field "Ospedale") but does not work:

Code: Select all

on MouseUp
dispatch "SortDataByKey" to group "DataGrid_Att_h_fasce" with "Ospedale", "text", "Ascending", "false"
dispatch "RefreshList" to group "DataGrid_Att_h_fasce" 
end MouseUp
thank you

Re: SortDataByKey

Posted: Wed Sep 17, 2014 1:11 pm
by Klaus
link76 wrote:I would like to filter my DG Form a column text (template row: field "Ospedale")
Sorry, don't understand!?
Do you have a column named "Ospedale" in your datagrid?

Re: SortDataByKey

Posted: Thu Sep 18, 2014 7:01 am
by link76
Klaus wrote:
link76 wrote:I would like to filter my DG Form a column text (template row: field "Ospedale")
Sorry, don't understand!?
Do you have a column named "Ospedale" in your datagrid?

I have a DG style Form, in row template is a label (column) "Ospedale", I would like to sort the values (Ascending or Descending),

thx

Re: SortDataByKey

Posted: Thu Sep 18, 2014 12:53 pm
by Klaus
Hmm, syntax is correct, sorry no idea so far...

I would however leave out the last line, because the last parameter of SortDataByKey
defines if RefreshList is also applied to the datagrid after sorting :D

Code: Select all

on MouseUp
    dispatch "SortDataByKey" to group "DataGrid_Att_h_fasce" with "Ospedale", "text", "Ascending", "TRUE"
end MouseUp
Best

Klaus

Re: SortDataByKey

Posted: Thu Aug 27, 2015 10:02 pm
by quailcreek
Old thread but same issue. Has anybody gotten this to work on a DG form? I have a DG form that's populated using dgText so I can filter it later.

"More" is the name of the fld in the DG row template. Nothing seems to work.

Code: Select all

dispatch “SortDataByKey” to grp "PracticeList_DG" with "More", "international", "descending", "false"

on FillInData pDataArray
   set the text of fld "Name" of me to  pDataArray["Name"]
   set the text of fld "More" of me to  pDataArray["PreformanceLevel"] 
end FillInData

Re: SortDataByKey

Posted: Fri Aug 28, 2015 2:32 am
by sritcp
On LC 6.7.6, the following code

Code: Select all

dispatch "SortDataByKey" to group "DgForm1" with "Field1", "text", "descending", "false"
works perfectly for me.

Something to do with LC7?

Regards,
Sri

Re: SortDataByKey

Posted: Fri Aug 28, 2015 4:03 am
by quailcreek
I figured it out. I have thumb nail images in the DG. This, for some reason, stops the sort from happening. I submitted a bug report. Thanks for the reply. For now I'll remove the images.

Re: SortDataByKey

Posted: Fri Aug 28, 2015 4:38 am
by quailcreek
OOpps. I found the problem. I copied the SortDataByKey from someplace. To lazy to type. :oops: and I ended up with curly quotes. Mybad.

Re: SortDataByKey

Posted: Mon Aug 31, 2015 12:07 pm
by bn
Hi Tom,

I've looked at
Bug 15802
that you reported. I have also seen your comment that it is not a bug.

The status is "confirmed"

You as the author can change the status to "Not a bug"

That way it reduces unnecessary open tickets in Quality Control Center. It would be a nice gesture and save QCC some time.

Kind regards
Bernd

Edit: when you open a bug report and refer to it it would be nice to also put the bug number. Thank you.

Re: SortDataByKey

Posted: Mon Aug 31, 2015 11:42 pm
by bn
Hi Tom,

thanks for setting Bug 15802 to "Not a Bug"

Kind regards
Bernd

Re: SortDataByKey

Posted: Mon Aug 31, 2015 11:44 pm
by quailcreek
No worries.

Re: SortDataByKey

Posted: Thu Sep 03, 2015 10:41 pm
by quailcreek
I got the sort, sorted out. :) But I have another question. When I sort on a key (ascending) where some of the entries are empty, the empty ones are at the top. Is there a way to sort ascending and have the empty values at the bottom?