ShareShortcuts

Record Weight

Record your weight into the health app in either pounds or kilos

gramps
Fork “Record Weight”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so gramps gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
59K
Saved
0
Actions
21
Category
Utilities
Version
1.0
Language
EN

Preview

Record your weight into the health app in either pounds or kilos. Results will be displayed in the health app default measure.

What's New

Version 1.0

First release

Version History
1.0 May 12, 2020

First release

What it does

21 actions
  1. Get Device Details
  2. If
  3. Show Alert
  4. Stop This Shortcut
  5. If
  6. Choose from Menu
    Pounds / Kilos?
  7. Choose from Menu
    Pounds?
  8. Ask for Input
    Weight in lbs?
  9. Log Health Sample
  10. Show Notification
    … lbs added Ok
  11. Vibrate Device
  12. Find Health Samples
  13. Choose from Menu
    Kilos?
  14. Ask for Input
    Weight in kilos?
  15. Log Health Sample
  16. Vibrate Device
  17. Show Notification
    … kilos added Ok
  18. Find Health Samples
  19. Show Alert
    Body Weight last 5 days
  20. Show Alert
    Body Weight Details in health app default units
  21. Continue Activity

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define mac false
#include 'actions/device'
#define color darkorange
#define glyph stethoscope

const DeviceModel = getDeviceDetail("Device Model")

if DeviceModel !contains "iPhone" {
	confirm("This shortcut needs the iPhone Health app.")
	stop()
} else {
	menu "Pounds / Kilos?" {
	item "Pounds?":
		const ProvidedInput = prompt("Weight in lbs?", "Number")
		rawAction("is.workflow.actions.health.quantity.log", {
			"WFQuantitySampleAdditionalQuantity": "",
			"WFQuantitySampleDate": "{CurrentDate}",
			"WFQuantitySampleQuantity": "",
			"WFQuantitySampleType": "Weight"
		})
		showNotification("{ProvidedInput} lbs added Ok", "Body Weight", false)
		vibrate()
		rawAction("is.workflow.actions.filter.health.quantity", {
			"WFContentItemFilter": "",
			"WFContentItemLimitEnabled": false,
			"WFContentItemSortOrder": "Latest First",
			"WFContentItemSortProperty": "Start Date",
			"WFHKSampleFilteringFillMissing": false
		})
	item "Kilos? ":
		const ProvidedInput = prompt("Weight in kilos?", "Number")
		rawAction("is.workflow.actions.health.quantity.log", {
			"WFQuantitySampleAdditionalQuantity": "",
			"WFQuantitySampleDate": "{CurrentDate}",
			"WFQuantitySampleQuantity": "",
			"WFQuantitySampleType": "Weight"
		})
		vibrate()
		showNotification("{ProvidedInput} kilos added Ok", "Body Weight", false)
		rawAction("is.workflow.actions.filter.health.quantity", {
			"WFContentItemFilter": "",
			"WFContentItemLimitEnabled": false,
			"WFContentItemSortOrder": "Latest First",
			"WFContentItemSortProperty": "Start Date",
			"WFHKSampleFilteringFillMissing": false,
			"WFHKSampleFilteringUnit": "kg"
		})
	}
	alert(, "Body Weight last 5 days")
	alert("Open Health App?", "Body Weight Details in health app default units")
	rawAction("is.workflow.actions.useractivity.open", {
		"AppBundleIdentifier": "com.apple.Health",
		"UserActivityData": "YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMSAAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGvEBELDElPVVZXW15fZWZnam5vclUkbnVsbN8QHg0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS0tMDEyLS0tLS04MToyLT0+MUAtLS0tRS1HMVxyZXF1aXJlZEtleXNVdGl0bGVad2VicGFnZVVSTF8QE2R5bmFtaWNBY3Rpdml0eVR5cGVfEBRwZXJzaXN0ZW50SWRlbnRpZmllcldvcHRpb25zXxAZZWxpZ2libGVGb3JQdWJsaWNJbmRleGluZ18QFWVsaWdpYmxlRm9yUHJlZGljdGlvbl8QEGJ1bmRsZUlkZW50aWZpZXJeZXhwaXJhdGlvbkRhdGVccGF5bG9hZEVycm9yVHV1aWRYa2V5d29yZHNcYWN0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wBnAG0ArAC5AL8AygDgAPcA/wEbATMBRgFVAWIBZwFwAX0BhgGOAaMBsgG3Ab4B1QHdAekCAwISAh0CIgIwAjkCTQJPAlECUwJVAlcCWQJaAlsCXQJfAmECYwJlAmcCaAJqAmsCbQJvAnECcgJ0AnYCeAJ6AnwCfgKAAoICgwKKApICnQKeAp8CoQKmArECugLHAsoC0wLaAvcC/AMEAw0DDwMUAxsDHgM0AzsDPQM/A0EDQwNFA2IEFQQaBDAENAQ5BDsEPQQ/BEwEUQRXBFoEXwR0BHcAAAAAAAACAQAAAAAAAAB2AAAAAAAAAAAAAAAAAAAEjA=="
	})
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by gramps

See All

You Might Also Like

See All
Advertisement