Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.4   8.5   9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1    Statistic  


Queries sample data from the database.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
HealthKit 8.2 No No No No Yes
MBS( "HealthKit.SampleQuery"; QuantityType; Unit; StartDate; EndDate { ; SortKey; ascending; limit } )   More


Parameter Description Example value
QuantityType The quantity type to lookup. "StepCount"
Unit The unit to use.
Can be SI unit or for example count for counters.
See Apple documentation for details.
StartDate The start date for the search. Date ( 1 ; 1 ; 2018 )
EndDate The end date for the search. Date ( 2 ; 1 ; 2018 )
SortKey Optional
How to sort.
Can be StartDate or EndDate.
ascending Optional
Whether to prefer ascending instead of descending.
Pass 1 for ascending or 0 for descending.
limit Optional
The limit for search.
Default 0 for no limit.


Returns values as JSON or error.


Queries sample data from the database.
Before calling this method, the application should request authorization to access objects with the desired quantity type.

Supported quantity types:

Body Measurements:
BodyFatPercentage, BodyMass, BodyMassIndex, Height, LeanBodyMass, WaistCircumference.

StepCount, DistanceWalkingRunning, DistanceCycling, DistanceWheelchair, BasalEnergyBurned, ActiveEnergyBurned, FlightsClimbed, NikeFuel, AppleExerciseTime, PushCount, DistanceSwimming, SwimmingStrokeCount, VO2Max.

HeartRate, BodyTemperature, BasalBodyTemperature, BloodPressureSystolic, BloodPressureDiastolic, RespiratoryRate.

OxygenSaturation, PeripheralPerfusionIndex, BloodGlucose, NumberOfTimesFallen, ElectrodermalActivity, InhalerUsage, InsulinDelivery, BloodAlcoholContent, ForcedVitalCapacity, ForcedExpiratoryVolume1, PeakExpiratoryFlowRate.

DietaryFatTotal, DietaryFatPolyunsaturated, DietaryFatMonounsaturated, DietaryFatSaturated, DietaryCholesterol, DietarySodium, DietaryCarbohydrates, DietaryFiber, DietarySugar, DietaryEnergyConsumed, DietaryProtein,
DietaryVitaminA, DietaryVitaminB6, DietaryVitaminB12, DietaryVitaminC, DietaryVitaminD, DietaryVitaminE, DietaryVitaminK, DietaryCalcium, DietaryIron, DietaryThiamin, DietaryRiboflavin, DietaryNiacin, DietaryFolate, DietaryBiotin, DietaryPantothenicAcid, DietaryPhosphorus, DietaryIodine, DietaryMagnesium, DietaryZinc, DietarySelenium, DietaryCopper, DietaryManganese, DietaryChromium, DietaryMolybdenum, DietaryChloride, DietaryPotassium, DietaryCaffeine, DietaryWater.



Query step count:

Set Field [ PlaceHolder::Result ; MBS( "HealthKit.SampleQuery"; "StepCount"; "count"; Date ( 1 ; 1 ; 2018 ); Date ( 1 ; 1 ; 2019 ) ) ]

Blog Entries

Created 25th April 2018, last changed 26th April 2018

HealthKit.RequestAuthorizationToShareTypes   -   HealthKit.WheelchairUse

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins