ImagePicker.SetSourceType
-------------------------

Sets the source type.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [ImagePicker](component_ImagePicker.md) | [7.3](newinversion73.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "ImagePicker.SetSourceType"; sourceType ) 

**MBS**( **"ImagePicker.SetSourceType"** /\* Sets the source type. \*/  
**$sourceType**) /\* The source to use to pick an image.  
Can be PhotoLibrary, Camera or SavedPhotosAlbum. e.g. "Camera" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| sourceType | The source to use to pick an image.   Can be PhotoLibrary, Camera or SavedPhotosAlbum. | "Camera" |

### Result

Returns OK or error.

### Description

Sets the source type.  
The type of picker interface to be displayed by the controller.  
Prior to running the picker interface, set this value to the desired source type. The source type you set must be available and an error will be returned if it is not. If you change this property while the picker is visible, the picker interface changes to match the new value in this property.  
The default value is PhotoLibrary.  
### See also

- [ImagePicker.GetSourceType](ImagePickerGetSourceType.md)
- [ImagePicker.New](ImagePickerNew.md)
- [ImagePicker.Present](ImagePickerPresent.md)
- [ImagePicker.SetMediaTypes](ImagePickerSetMediaTypes.md)
- [ImagePicker.SetOverlayImage](ImagePickerSetOverlayImage.md)

### Example Databases

- [iOS/Examples/iOS ImagePicker](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/iOS/Examples/iOS%20ImagePicker.shtml#4ScriptAnchor_)

### Blog Entries

- [Overlay image for Image Picker](https://www.mbsplugins.de/archive/2018-05-25/Overlay_image_for_Image_Picker/monkeybreadsoftware_blog_filemaker)
- [Image Picker for FileMaker iOS SDK apps with MBS Plugin](https://www.mbsplugins.de/archive/2017-06-20/Image_Picker_for_FileMaker_iOS/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th June 2017 , last changed 18th June 2017

  
[ImagePicker.SetShowsCameraControls](ImagePickerSetShowsCameraControls.md) - [ImagePicker.SetVideoMaximumDuration](ImagePickerSetVideoMaximumDuration.md)

[HTML Version](ImagePickerSetSourceType.shtml)