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
List
is
default
Title
begins with
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
MATHS
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
MATHS
Number
×
10.0
Options Under Construction
TEXT
VARIABLES
Set variable
amount
to
Input
End If
End If
VARIABLES
Get
amount
VARIABLES
Add
Input
to
itemsChecked
End Repeat
VARIABLES
Get
itemsChecked
SCRIPTING
Get
First Item
from
List
VARIABLES
Get
itemsChecked
SCRIPTING
Get
Last Item
from
List
VARIABLES
SCRIPTING
If
Input
Condition
SCRIPTING
Ask
What date is this expense from?
Input Type
Date
Default Answer
Time
CALENDAR
Format
Date
Options Under Construction
End If
VARIABLES
TEXT
Split
Text
by
Custom
*
SCRIPTING
Repeat with each item in
Input
SCRIPTING
If
Input
Condition
VARIABLES
Add
Input
to
expenseToCombine
Otherwise
SCRIPTING
If
Input
Condition
VARIABLES
Add
Input
to
expenseToCombine
Otherwise
SCRIPTING
If
Input
Condition
VARIABLES
VARIABLES
Add
Input
to
expenseToCombine
Otherwise
VARIABLES
Add
Input
to
expenseToCombine
End If
End If
End If
End Repeat
VARIABLES
Get
expenseToCombine
TEXT
Combine
Text List
with
Custom
Text
REMINDERS
Options Under Construction
NUMBER
0.1
SCRIPTING
REMINDERS
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 a month ago

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

Visit iCloud (iOS)

Copy iCloud Link

Scan QR Code

0