![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I have a data based sorted by the first field name. In some records I have the letters "SD" typed in at the end of the first field with a space between the other data within that field on those records. Is there any way I can group all of those records together so that the data base is divided into two groups: those with "SD" in the first field and those without the "SD" in the first field. I want each of the groups to be sorted alphabetically as in the original. |
#4
| |||
| |||
|
|
On 27/05/11 8:59 PM, Frank wrote: I have a data based sorted by the first field name. In some records I have the letters "SD" typed in at the end of the first field with a space between the other data within that field on those records. Is there any way I can group all of those records together so that the data base is divided into two groups: those with "SD" in the first field and those without the "SD" in the first field. I want each of the groups to be sorted alphabetically as in the original. It sounds like you are combining a name with a status (member of a group). That is not a normalized field. Perhaps read up on Normalization and First Normal Form (1NF). Create a new field group_status_code, as a number field (0, 1). Format the field on the layout for a boolean result, 0 = "" (blank) 1 = SD, just for the display. Create a simple script edit_toggle_group_status to toggle the status value, and add to the field making the field a button. set field group_status_code = Let( F = group_status_code ; Case( IsEmpty( F ) ; 1 ; F = 1 ; 0 ; F = 0 ; 1 ; )) ( add commit/refresh last steps) |
#5
| |||
| |||
|
|
I have a data based sorted by the first field name. In some records I have the letters "SD" typed in at the end of the first field with a space between the other data within that field on those records. Is there any way I can group all of those records together so that the data base is divided into two groups: those with "SD" in the first field and those without the "SD" in the first field. I want each of the groups to be sorted alphabetically as in the original. |
)
#6
| |||
| |||
|
|
Thank you cortical but your solution is a bit too entailed for this step of my project. If you have any more simplified solution, I'd like to read it. |
|
cortical wrote: On 27/05/11 8:59 PM, Frank wrote: I have a data based sorted by the first field name. In some records I have the letters "SD" typed in at the end of the first field with a space between the other data within that field on those records. Is there any way I can group all of those records together so that the data base is divided into two groups: those with "SD" in the first field and those without the "SD" in the first field. I want each of the groups to be sorted alphabetically as in the original. It sounds like you are combining a name with a status (member of a group). That is not a normalized field. Perhaps read up on Normalization and First Normal Form (1NF). Create a new field group_status_code, as a number field (0, 1). Format the field on the layout for a boolean result, 0 = "" (blank) 1 = SD, just for the display. Create a simple script edit_toggle_group_status to toggle the status value, and add to the field making the field a button. set field group_status_code = Let( F = group_status_code ; Case( IsEmpty( F ) ; 1 ; F = 1 ; 0 ; F = 0 ; 1 ; )) ( add commit/refresh last steps) |
![]() |
| Thread Tools | |
| Display Modes | |
| |