SharingService.ServicesForItems
-------------------------------

Queries available services for some items.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SharingService](component_SharingService.md) | [10.3](newinversion103.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "SharingService.ServicesForItems"; Flags; Item... ) 

**MBS**( **"SharingService.ServicesForItems";** /\* Queries available services for some items. \*/  
**$Flags**; /\* Various flags.  
Pass 1 to include images for the sharing as base64 encoded PNGs, which you can show in the GUI.e.g. 0 \*/   
**$Item...**) /\* Pass one parameter for each item.  
An item may be a container with an image, a list of URLs, a list of native file paths or styled text.e.g. "Hello World" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Flags | Various flags.   Pass 1 to include images for the sharing as base64 encoded PNGs, which you can show in the GUI. | 0 |
| Item... | Pass one parameter for each item.   An item may be a container with an image, a list of URLs, a list of native file paths or styled text. | "Hello World" |

### Result

Returns JSON or error.

### Description

Queries available services for some items.  
Pass as many parameters as needed to include all URLs, native file paths, styled text or container values with images to the function as needed.  
  
This function takes variable number of parameters. Pass as much parameters as needed separated by the semicolon in FileMaker.  
Please repeat Item parameter as often as you need.  
### Examples

Fill field with list of services available for items:

 Set Variable \[ $json ; Value: MBS ("SharingService.ServicesForItems";   
0; // flags, no images   
// pass as many parameter with items. Empty ones will be ignore.   
Sharing Services::URLs ;   
Sharing Services::Text ;   
Sharing Services::Image ;   
Sharing Services::File Paths) \]   
  
If \[ MBS ("IsError") = 0 \]   
 Set Variable \[ $json ; Value: MBS ("[JSON.Colorize](JSONColorize.md)"; $json ) \]   
End If  
Set Field \[ Sharing Services::ServiceNames ; $json \]  
Query services for text:

 MBS ( "SharingService.ServicesForItems"; 0; "Hello World" )  
<small>  
Example result:   
\[ { "menuItemTitle" : "Mail" , "title" : "Mail" , "name" : "com.apple.share.Mail.compose" }, { "menuItemTitle" : "Messages" , "title" : "Messages" , "name" : "com.apple.messages.ShareExtension" }, { "menuItemTitle" : "Notes" , "title" : "Notes" , "name" : "com.apple.Notes.SharingExtension" }, { "menuItemTitle" : "Reminders" , "title" : "Reminders" , "name" : "com.apple.reminders.sharingextension" } \] </small>### See also

- [IsError](IsError.md)
- [JSON.Colorize](JSONColorize.md)

### Example Databases

- [Mac only/Sharing Services](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Sharing%20Services.shtml#3ScriptAnchor_)

### Blog Entries

- [Create an email in Apple Mail from FileMaker](https://www.mbsplugins.de/archive/2025-06-02/Create_an_email_in_Apple_Mail_/monkeybreadsoftware_blog_filemaker)
- [Using Sharing Services in MacOS with FileMaker](https://www.mbsplugins.de/archive/2020-06-29/Using_Sharing_Services_in_MacO/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 27th June 2020 , last changed 31st May 2025

  
[SharingService.GetEmailSubject](SharingServiceGetEmailSubject.md) - [SharingService.SetEmailRecipients](SharingServiceSetEmailRecipients.md)

[HTML Version](SharingServiceServicesForItems.shtml)