Code: Select all
on mouseUp
local contact_id, search, contact_ids, tContact
put field txtSearch into search
if the environment is "mobile" then
# returns id
put mobilePickContact into contact_id
answer "contact id is: " & contact_id
# search based off of text box
if search is empty then
answer "Please enter a search string"
else
put mobileFindContact (search) into contact_ids
answer "search contact ids: " & contact_ids
end if
# show the first contact details
mobileShowContact (contact_id)
# return data about the first contact
put mobileGetContactData (contact_id) into tContact
if tContact is an array then
answer tContact["firstname"]
else
answer "No results"
end if
else
answer "Must be on a mobile device for this to work"
end if
end mouseUp
1st time call:
"contact id is: mobilePickContact" ?? if I just put mobilePickContact then it does bring up a list of contacts, but how do I save that ID that they selected?
"search contact ids: 21" - this seems to work
mobileShowContact contact_id does not do anything
"No results" - should get the contact data if the above worked?
2nd time:
"contact id is: mobilePickContact"
App crashes. (on ipad)