|
|
How to get a reference to the record selected in a list view of a group 
Posted: 20 Feb 09 8:51 AM
|
Is there a way of getting reference to the record selected in a list view of a group? For example if I create a contact group of all contacts with a response to a campaign (joining the targetresponse table) and select one record, will I be able to get the targetresponseid so that I can highlight that particular targetresponse record in a tab. In other words is there a way of storing globally the .GetCurrentField("A3_TARGETRESPONSEID") of a contact group?
Thanks. |
|
|
| |
| |
|
Re: How to get a reference to the record selected in a list view of a group 
Posted: 03 Aug 09 4:03 AM
|
Hi,
this code was very useful to me !!! Thanks a lot !!!
@ Ram Sundaresan: I found out that the .Item(i) returns the primarykey value of the selected record. Even if it is a customized non-SLX-table.
Btw: Created a function based on the code above to retrieve those ids and it works brilliant !
M. |
|
|
|
Re: How to get a reference to the record selected in a list view of a group 
Posted: 22 Feb 10 7:34 AM
|
Apologies for bumping this, but I have a further question and hopefully one of you guys might be able to shed some light on it.
If application.MainViews.ActiveView.GroupsPane.Selection.item(i) (where i is one of the selected items) returns the primary key of the group. Is there a way of getting the values of any of the other columns in the group layout by fieldname?
For example, if the group is a contact group containing all campaign responses between two dates, and one of the columns is a TARGETRESPONSEID (as such, the same contact may be in the group multiple times) - is there any way of retrieving that TARGETRESPONSEID from the Selection.Item(i)?
Eg. application.MainViews.ActiveView.GroupsPane.Selection.item(i).Value("TARGETRESPONSEID")
|
|
|
| |
|
Re: How to get a reference to the record selected in a list view of a group 
Posted: 26 Feb 10 10:35 AM
|
Originally posted by Stainless Steel Snake
Use following code: For i = 0 To Application.MainViews.ActiveView.GroupsPane.Selection.Count - 1 strTargetResponseID = Application.MainViews.ActiveView.GroupsPane.Selection.Item(i) ... Next |
|
Is there a faster way to do this? on a 4,000 row selection this is just dog slow? |
|
|
| |
|