You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

iPhone shortcut “if error then use alternative Action”? Use case find same name but another language?

I need help with modifying my iPhone shortcut that adds a row to Numbers . English language was used at shortcut creation, and without knowing how to save to any table name, I used “Table”.

Problem is after I switched language for using Map App (because it is difficult to know English name of streets in my location). I forgot to switch back to English language when running said shortcut.


If “if error then go to” is possible , then I can add alternative Action to save row to Table name of different language.


i wish Apple shortcut allows either

  1. any table name
  2. regex




iPhone XR

Posted on Aug 30, 2024 6:38 AM

Reply
5 replies

Aug 30, 2024 7:09 AM in response to SunnyInToronto

EDIT: Ignore the stuff I wrote below if you aren't using Applescript in your shortcut


Not sure what's going on with your script/shortcut but Applescript does have an error handler. Below is the basic/simple version. I think it can have multiple error handlers to handle different error codes, if that is required.


Are you saying that a script written in one language


try
--whatever your code is
on error
--handle the error
end try

Sep 1, 2024 3:07 AM in response to Sunnyintoronto123

You can completely eliminate care of table naming, without the use of Regex.


If you have only one table on the sheet, do not put a table name in the shortcut. It will add a row to the one table on the specified sheet regardless of the table name.


If no sheet is specified, it will add a row to the one table on the first sheet (the first tab).


If the sheet has more than one table, it will add a row to the oldest table on the sheet. You can change the order of oldest to newest by cut/pasting the tables so that the one you want becomes the oldest one on the sheet.

iPhone shortcut “if error then use alternative Action”? Use case find same name but another language?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.