Login About Gallery
Log Expenses
COMMENT
‎Log Expenses v1.0 Created by /u/TheRealClose Request by /u/Jibeddy
COMMENT
‎Set up required: Set up a new Reminders list titled "Expenses" -- if you wish to name this something else, simply change the first Text field below to match. Next, add a single reminder titled "Total Expenses: $0" -- if you wish to change this format, simply change the second Text field below to match. It is important that the second text field below does not contain "0", but that the first reminder you create does. Once these are set up, you are ready to use the shortcut! It is important that when promoted to remove a reminder, tap 'Remove' -- this removes the old total. If you wish to change the format of the individual expenses, simply rearrange what's in the third Text field -- It is important to ensure that *EXPENSE*, *COST*, and *DATE* are spelt correctly. The date is optional but the others must be included. It is also important that you do not use the " * " symbol anywhere else in the format. Enjoy!
TEXT
‎Expenses
TEXT
‎Total Expenses: $
TEXT
‎*EXPENSE*: $*COST* - *DATE*
REMINDERS
‎Find ‎All Reminders ‎where
‎All the following are true
‎[{'class': 'filter-property', 'value': 'List'}, {'class': 'filter-operator', 'value': 'is'}, {'class': 'filter-benchmark', 'value': 'default'}]
‎[{'class': 'filter-property', 'value': 'Title'}, {'class': 'filter-operator', 'value': 'begins with'}, {'class': 'filter-benchmark', 'value': 'anything'}]
Sort by
‎None
Limit
Get 1 File
VARIABLES
‎Set variable ‎currentTotal ‎to ‎Input
REMINDERS
‎Get ‎Title ‎from ‎Reminder
TEXT
‎Split ‎Text ‎by ‎Custom ‎$
SCRIPTING
‎Get ‎Last Item ‎from ‎List
SCRIPTING
‎Ask ‎What's the name of the expense?
Input Type
‎Text
Default Answer
‎Text
SCRIPTING
‎Ask ‎How much was the expense?
Input Type
‎Number
Default Answer
‎0
MATHS
‎Round ‎Input ‎to ‎Ones Place
Mode
‎Normal
VARIABLES
‎Add ‎Input ‎to ‎itemsToCheck
VARIABLES
‎Get ‎Item from List - currentTotal
MATHS
‎Number ‎+ ‎Rounded Number - Expense
‎Options Under Construction
VARIABLES
‎Add ‎Input ‎to ‎itemsToCheck
SCRIPTING
‎Repeat with each item in ‎Input
VARIABLES
‎Set variable ‎amount ‎to ‎Input
SCRIPTING
‎If ‎Input ‎Condition
TEXT
‎Split ‎Text ‎by ‎Custom ‎.
VARIABLES
‎Set variable ‎amountSplit ‎to ‎Input
SCRIPTING
‎Get ‎First Item ‎from ‎List
VARIABLES
‎Set variable ‎splitLeft ‎to ‎Input
VARIABLES
‎Get ‎amountSplit
SCRIPTING
‎Get ‎Last Item ‎from ‎List
TEXT
‎Split ‎Text ‎by ‎Every Character
SCRIPTING
‎Count ‎Split Text ‎in ‎Input
SCRIPTING
‎If ‎Input ‎Condition
VARIABLES
‎Get ‎Item from List - splitRight
MATHS
‎Number ‎× ‎10.0
‎Options Under Construction
TEXT
‎Calculation Result ‎. ‎splitLeft
VARIABLES
‎Set variable ‎amount ‎to ‎Input
SCRIPTING
‎End If
SCRIPTING
‎End If
VARIABLES
‎Get ‎amount
VARIABLES
‎Add ‎Input ‎to ‎itemsChecked
SCRIPTING
‎End Repeat
VARIABLES
‎Get ‎itemsChecked
SCRIPTING
‎Get ‎First Item ‎from ‎List
VARIABLES
‎Get ‎itemsChecked
SCRIPTING
‎Get ‎Last Item ‎from ‎List
VARIABLES
‎Get ‎Text - expenseText
SCRIPTING
‎If ‎Input ‎Condition
SCRIPTING
‎Ask ‎What date is this expense from?
Input Type
‎Date
Default Answer
‎Time
CALENDAR
‎Format ‎Date
‎Options Under Construction
SCRIPTING
‎End If
VARIABLES
‎Get ‎Text - expenseText
TEXT
‎Split ‎Text ‎by ‎Custom ‎*
SCRIPTING
‎Repeat with each item in ‎Input
SCRIPTING
‎If ‎Input ‎Condition
VARIABLES
‎Get ‎Ask for Input - Expense
VARIABLES
‎Add ‎Input ‎to ‎expenseToCombine
SCRIPTING
‎Otherwise
SCRIPTING
‎If ‎Input ‎Condition
VARIABLES
‎Get ‎Item from List - checkedExpense
VARIABLES
‎Add ‎Input ‎to ‎expenseToCombine
SCRIPTING
‎Otherwise
SCRIPTING
‎If ‎Input ‎Condition
VARIABLES
‎Get ‎Formatted Date
VARIABLES
‎Add ‎Input ‎to ‎expenseToCombine
SCRIPTING
‎Otherwise
VARIABLES
‎Add ‎Input ‎to ‎expenseToCombine
SCRIPTING
‎End If
SCRIPTING
‎End If
SCRIPTING
‎End If
SCRIPTING
‎End Repeat
VARIABLES
‎Get ‎expenseToCombine
TEXT
‎Combine ‎Text List ‎with ‎Custom ‎Text
TEXT
‎Item from List - checkedTotal ‎Text - totalText
REMINDERS
‎Add ‎Combined Text - expenseToAdd ‎to ‎Text - List ‎with ‎No Alert
‎Options Under Construction
NUMBER
‎0.1
SCRIPTING
‎Wait ‎Number - Wait
REMINDERS
‎Add ‎Text - totalToAdd ‎to ‎Text - List ‎with ‎No Alert
‎Options Under Construction
VARIABLES
‎Get ‎currentTotal
REMINDERS
‎Remove ‎Reminders
SCRIPTING
‎Show alert ‎Expense added!
Title
‎Expense added!
Show Cancel Button

Showcuts

Magic Vars

Screenshot

Submitted Anonymously 3 years ago

This is an old shortcut, so some variables might be missing!

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0