I'm trying to build my own browse form modeled after the customer browse form in the Alpha Sports demo ap. I'm afraid I can't completely figure out how things work in the Alpha Sports app. I pretty much have everything working except for making the embeded browse display the field values that are selected in the search drop down. I've looked at the code in the Alpha sports ap and tried to both cut and paste it into my app, and build it from scratch to no avail. Best as I can figure out, the table.sort is not working but I don't know why.
Is there a way to build that functionality in the Genie?
If so, anyone know the correct set of steps?
What I see in my app is:
the Column name header changes,
the browse does do the refresh,
I do go back to record number 1,
but I always display the values in the Lastname field.
No matter what I select in the search field, the browse always displays the Lastname field from my Members table. In my case, Members = Customers in Alpha Sports.
If it helps any, I'll paste in my edited version of the script. I'm lost. I appreciate any help from anyone. If the scripts in Alpha Sports were duplicatable in the Genie, I would have a starting point to go from. I'm too new at this to be able to fully understand Xbasic yet.
here is the script.
-------------------
'Date Created: 11-Jul-2002 10:07:42 PM
'Last Updated: 19-Sep-2003 10:06:21 AM
'Created By :
'Updated By :
'set the column heading of the browse object to be the same as the entry selected in the combo box.
topparent:Browse1:Mem_last_name.Object.Column_title = search1.text
'Set the width of the column in the browse to 30 (it will have gotten set to a smaller value when the SearchBy variable was changed)
Browse1:Mem_last_name.Entry.Width = 30
'now sort table by the field that was selected
dim tbl as p
tbl = table.current()
tbl.order(search1.text,search1.text + " \"\"")
'refresh the display
browse1.refresh()
'After changing the SearchBy variable, the data is ordered by the selected field. Set focus to the first record in the sort order.
topparent.fetch_first()
--------------
end of script
tia
cab
Is there a way to build that functionality in the Genie?
If so, anyone know the correct set of steps?
What I see in my app is:
the Column name header changes,
the browse does do the refresh,
I do go back to record number 1,
but I always display the values in the Lastname field.
No matter what I select in the search field, the browse always displays the Lastname field from my Members table. In my case, Members = Customers in Alpha Sports.
If it helps any, I'll paste in my edited version of the script. I'm lost. I appreciate any help from anyone. If the scripts in Alpha Sports were duplicatable in the Genie, I would have a starting point to go from. I'm too new at this to be able to fully understand Xbasic yet.
here is the script.
-------------------
'Date Created: 11-Jul-2002 10:07:42 PM
'Last Updated: 19-Sep-2003 10:06:21 AM
'Created By :
'Updated By :
'set the column heading of the browse object to be the same as the entry selected in the combo box.
topparent:Browse1:Mem_last_name.Object.Column_title = search1.text
'Set the width of the column in the browse to 30 (it will have gotten set to a smaller value when the SearchBy variable was changed)
Browse1:Mem_last_name.Entry.Width = 30
'now sort table by the field that was selected
dim tbl as p
tbl = table.current()
tbl.order(search1.text,search1.text + " \"\"")
'refresh the display
browse1.refresh()
'After changing the SearchBy variable, the data is ordered by the selected field. Set focus to the first record in the sort order.
topparent.fetch_first()
--------------
end of script
tia
cab
Comment