May 26, 2011 at 5:04 pm #699AnonymousInactive
I am using explorerlistview and explorerlistmodellinked for a schedule screen.
When the user selects one record on the screen, is there any way to figure out which record the user has selected?
I want to access that specific record to copy it into another file.
In the subroutine Copy_to_ticket is where i want to access the specific record.
rename btsch_date to btsch_date_default,
btsch_num to btsch_num_new’
(btsch_date_default, group: 0)))
rename btsch_num to btsch_num_hdr,
bizpartner_num to bizpartner_num_customer,
btschinf_num to btschinf_num_new
(btschinf_time group: 1.3) (btschinf_copied?, group: 2) nl nl
(btschinf_job, group: 0) nl
(bizpartner_num_customer, group: 0) (btschinf_contact, group: 1) (btschinf_cell)nl
(btschinf_address1_ship, group: 0) nl
(btschinf_city_ship, group: 0) (btschinf_ponumber, group: 1) nl nl nl nl nl
(btschinf_qty_order, group: 0) nl nl
(btschinf_formula, group: 0)(btschinf_formulaabbrev, group: 1)(btschinf_strength) (btschinf_cementtype) nl nl
(btschinf_type_pour, group: 0)nl nl nl
(btschinf_other, group: 0) (btschinf_other_price, group: 1)nl nl nl nl
(btschinf_accel, group: 0)(btschinf_aea_dosage) (btschinf_122r_dosage)(btschinf_glenium_dosage) nl nl nl nl
(btschinf_pump, group: 0) (btschinf_tested) (btschinf_color) (btschinf_fibre) nl nl nl
(btschinf_slump, group: 0) nl nl
(btschinf_comments, group: 0) nl nl
(Button ‘Print’, no_tabstop: true, xstretch: 0)
(Button ‘Copy To Ticket’, no_tabstop: true, xstretch: 0)
(Button ‘Calculate Meters’, no_tabstop: true, xstretch: 0)
(Button ‘Calculate Price’, no_tabstop: true, xstretch: 0))
columns: (“btschinf_time”, “bizpartner_num_customer”, “btschinf_address1_ship”, “btschinf_city_ship”, “btschinf_qty_order”,
“btschinf_accel”, “btschinf_aea_dosage”, “btschinf_122r_dosage”, “btschinf_glenium_dosage”, “btschinf_fibre”,
“btschinf_color”, “btschinf_tested”, “btschinf_type_pour”,
“btschinf_other”, “btschinf_pump”, “btschinf_contact”, “btschinf_cell”, “btschinf_comments”)
locate: #(keys: (btsch_date_default),
hdr = .Access.GetData()
if (” isnt warning = Ar_CreditLimit(hdr.bizpartner_num_customer, hdr))
ToolDialog(.Window.Hwnd, Object(‘Ar_CreditWarning’, warning,
hdr.bizpartner_num, .Access, afterfield:))
if not .Access.SaveFor(‘Copy’)
record = .Access.GetData().explorerlist_data
new_num = Bt_Schedule_Copy_Ticket(record.Copy(), t, .Window.Hwnd)
x = t.Query1(‘bt_scheduleinfo
where btschinf_num is ‘ $ Display(.Access.GetData().btschinf_num_new))
x.btschinf_copied? = true
SuneidoLog(“Copy to Ticket ” $ record.btticket_ticket_renamed,
===========================================================May 26, 2011 at 8:00 pm #845
If you are using a Controller to contain your ExplorerListView, you can define a method in the Controller class called ExplorerListView_Selection which will get called whenever an item is selected in the ExplorerListView. The method should accept an argument which is the record being selected.May 27, 2011 at 10:42 pm #846AnonymousInactive
I didnt understand.
I have attached the program. In the subroutine “Copy to Ticket” is where I want to access the (user) selected record in Explorerlistview.
Browse – uses GetRow(), is there anything available for ExplorerListView.
ThanksMay 30, 2011 at 3:02 pm #847
The first step is to get a reference to the ExplorerListViewControl. I think you named your ExpIorerListView ‘btsch_num_new2’. You can use the FindControl method and pass the name of the control to find it:
exp = .FindControl(‘btsch_num_new2’)
Then you’ll need to use the GetView method to get the data from the current listview record:
data = exp.GetView().Get()June 3, 2011 at 9:16 pm #848AnonymousInactive
Thanks for the help.
1. Now I am having issues with changing any records in the explorerlist. FIrst I enter the records in the Explorer list, if I exit the screen and go back in to change the record I get an error.
error is Query1 not unique btscheduleinfo rename…..
I accessed the file “btscheduleinfo”, btschinf_num is unique and btsch_num is the same for all the records in a specific date.
2. Also there is Access_AfterField; is there something similar for ExplorerListVIew.
3. If there are more than one person in the schedule screen – ExplorerListView (in the same date).
then added or updated records will not be seen by all users unless they exit then return back into schedule.
Is this right?June 6, 2011 at 3:06 pm #849
1. The Query1 not unique error is probably coming from the ExplorerListViewModelLinked class. In your code, you are passing your query and a keyfields object to the ExplorerListViewModelLinked class. The keyfields object must contain fields that when combined form a key on your table. You are not passing a key. Try passing in btschinf_num_new.
2. Try ExplorerListView_RecordChanged which should accept two arguments, the member changing and the current record selected in the ExplorerListView.
3. ExplorerListView does not automatically refresh its data, so users would have to exit and go back to see changes made by other users.June 9, 2011 at 6:41 pm #850AnonymousInactive
Thanks for you help.
Explorerlistview does not have auto refresh is an issue for what I want to do.
I would like to setup a schedule that has 15-50 orders in a specific day. Also have the ability to update different orders on a specific day by more than one user with auto refresh.
Do you have suggestion on which controllers will work?June 10, 2011 at 3:22 pm #851
None of the Suneido data entry Controllers that I know of have a built-in automatic refresh.
To do this you’d need a timer in your Controller (BookControl does this). On the timer you could call Save and then Refresh/Reload the data in your Controller. One problem with this is you wouldn’t want to do this if the user was in the middle of an entry. There would likely be other issues to deal with that I haven’t thought of.July 7, 2011 at 1:47 am #852AnonymousInactive
I have setup a schedule screen by date(Access). Within each date is a list of all the orders(ExplorerListVIew). But for every order it can have 1 to 50 transactions – qty batched.
I want to display the transactions beside the the explorerlist at the bottom of the screen. Is this possible?
Also I have added a field – total qty batched to the orders. I would like to display the total qty batched for EACH order. I tried to trigger the rule to calculate the qty batched but I can only get one order at a time to update on the screen.
THanksJuly 7, 2011 at 3:41 pm #853
Is the btschinf_qty_batch an actual field in the table schema? If you do not need to save this field, then I would suggest that it not be part of the table schema. This will ensure that the rule gets evaluated every time. Otherwise you’ll have to worry about dependancies.
Do you have code to create the tables? I can look into this in more detail if I can create the tables.July 7, 2011 at 5:07 pm #854AnonymousInactive
Attached is the file.
Bt_Schedule – Access – date
Bt_Scheduleinfo – Explorer – orders for the day
Bt_Scheduleqty – all the tranactions for the orders
THanksJuly 8, 2011 at 3:16 pm #855
I see that the btschinf_qty_batch field is in the table schema but is capitalized. This means the rule should be triggered the first time that field is accessed after reading from the database. The rule should also execute whenever a dependency of the rule changes. Dependencies are the other fields that the rule is using to determine its value.
If you want to force the rule to execute, you can loop through the explorerlist_data field from the Access record (the main schedule record). This will be an object containing each of the records from the ExplorerListView. Then you can call Record’s Invalidate method on each record and pass the field name (btschinf_qty_batch). Then if you access the field the rule will be evaluated on that record. Invalidate does not actually “refresh” the rule, it just tells the record that the next time anything references that field, that the rule should be re-evaluated.
In the case of adding the quantity records for each order, you could try adding a BrowseControl to your ExplorerListView layout. You would have to name it with the key field from the ExplorerListView records and also use Browse’s linkField option which would be the matching key field in the quantity records. I’m not sure how well that is going to work because I haven’t tried it. That’s quite a bit to display on one screen.July 11, 2011 at 11:22 pm #856AnonymousInactive
THanks, the Invalidate worked great!
I tried the browse for the qty but cant get it to work. So I have attached the rules and program. If I comment the Linkfield out, then all the quantities display on the screen. But if I put the linkfield in for the Browse then nothing displays.
Also is there a way to put 2 displays side by side?
In the Explorerviewlist is there a way to highlight one row a different / bright color?
Last question,is it possible to have a button blinking?
ThanksJuly 14, 2011 at 11:23 pm #857
You need to make sure you are passing the name argument to the Browse. This should be the key value from the header table. The linkField needs to be the field name in the line-item table that corresponds to the key value in the header table. Double check these options to ensure you are using the correct fields.
If you want two controls side by side, put them in a HorzControl.
You can highlight list items different colors but you must do it manually. This means you would also have to clear the highlight at the proper time manually as well.
To do this you’ll need to get the ListControl by using ExplorerListView’s GetList method. Once you have the ListControl, you can call the HighlightValues method on it. Use the ClearHighlight method to clear the highlight.
I don’t think there’s a blinking button, but you can color buttons using ColorButtonControl. This control supports passing the color initially and also setting on the fly using the SetColor method.July 20, 2011 at 1:54 am #858AnonymousInactive
In the explorerlistview a row is selected for “copy to ticket”(button). In this routine qty and truck information are saved in bt_scheduleqty file. I used validate to display the truck(s) infomation in explorerlistview. This works great except when the user is in editmode, the truck info does not display. Is there a way for edit mode = off? Or is there another fix?
- You must be logged in to reply to this topic.