selecting contacts

jscoulter

Member
Licensed User
Longtime User
Hi All.
I have some code that iterates thru the contact to show only contacts with a mobile phone number.
I then use InputMap to display the contacts the user can select, BUT when the data map is returned after the user closes the dialog show by InputMap all I get is the key value and wether or not the item was selected(true or false).
When I add contacts to the map passed to InputMap I pass in the contact name and the contact ID using the myMap.PUT() function.
I need the contact ID because I cant rely on the name passed back as I or the user might have multiple contacts with the same name.....for whatever reason.
How would I tackle this to get the result I am after?
I thought about using a type, but when the map data is displayed in the dialog, it will show the items of the type rather than the name as it does now.

Any help appreciated. I am sure I am not the first to have this problem

Thanks, Jeremy
 

jscoulter

Member
Licensed User
Longtime User
Ok, dont want to sound dumb here, but how does that help?
for example here is say map 1 that gets passed to the inputmap function

Jeremy=1
Fred=2
Jeremy=3

the second map as you proposed would be the same.

Now, the result after I select Jeremy and Fred from the inputmap fuction

Jeremy=true, Fred=false, Jeremy=true

I suspect you idea is to now search the second proposed map for the contact id....but in this scenario, which Jeremy am I searching for? contact id 1 or 3?

Thanks, Jeremy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…