iOS Shortcut If statement if someone presses cancel on Contacts

I am still coming to grips with the programming language for shortcuts so please excuse my ignorance and I hope it is okay to post these basic questions here. I have created a shortcut that scans a QR code for any product that we loan out. It then opens my Contacts for me to enter who I have loaned it to. My question is, how do I manage it if the person is not in Contacts? If I hit cancel in the Contacts input it cancels right out of the shortcut but what I would like it to do is open a text input where I can manually input who the product has been loaned to.

Thanks
Rick

That action step forces you to select a contact or cancel the process.

You could select someone from contacts and then have a subsequent step to ask if the contact name needs overriding.

Whilst you could pop up a menu for this, I think the most efficient way would be to pop up an Ask for Input action and pre-populate it with the name of the selected contact. You can then either OK or overtype the name.

Hope that helps.

Hmm, wouldn’t a more appropriate workflow be to prompt first if you want to add it to an existing contact or manually specify? Then you don’t have to choose a random contact for no reason. That’s also similar to how adding a new phone number or email address to a contact works in iOS - two buttons, “Add to Existing Contact” and “Create New Contact”.

You could have a Find Contacts with and Ask Each TIme iin the Name field, and if it returns nothing go to Enter Manually. Of course if your not sure if its in there you could still come across the cancel issue.

You could instead put the Calendar Items in a list along with Enter Manually, and then do a choose from list and test to see if Enter Manually has been selected.
(currently buggy on my 13 beta, doesnt work if sending whole contact list, but should be fine on 12)

Yes, but my assumption was, based on the phrasing of the question, that the OP had the contact in there, then found out that they didn’t. Otherwise, absolutely agree the other way around would be more direct.

Just remember that the limitation here (iOS 13 beta vs. public build variations aside :wink:) is that the filtering will effectively search against just the specified fields with separate inputs unless you jump through a lot of concatenaytion and de-duplication hoops; whereas the contacts search will search across multiple fields from a single input (first name, last name, company, e-mail address, …). Unless you know you are always searching on a particular field (e.g. first name), the inbuilt select action is going to be the more flexible option.