Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

PhotoPicker.File

Queries native file path for the image.

Component Version macOS Windows Linux Server iOS SDK
PhotoPicker 12.5 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "PhotoPicker.File"; Index )   More

Parameters

Parameter Description Example
Index The index of the image.
From 0 to PhotoPicker.ImageCount-1.
$index

Result

Returns file path or error.

Description

Queries native file path for the image.

Examples

Process all the images:

Set Variable [ $ImageCount ; Value: MBS("PhotoPicker.ImageCount") ]
Set Variable [ $index ; Value: 0 ]
If [ $index < $ImageCount ]
    Loop
        # Process each image
        Set Variable [ $FilePath ; Value: MBS("PhotoPicker.File"; $index) ]
        Set Variable [ $Error ; Value: MBS("PhotoPicker.Error"; $index) ]
        #
        If [ Length ( $FilePath ) > 0 ]
            New Record/Request
            If [ Right ( $FilePath; 5 ) = ".heic" ]
                # special case for HEIC images -> we convert them to PNG
                Set Variable [ $Image ; Value: MBS( "Container.ReadImageFile"; $FilePath; "PNG"; "image.png") ]
            Else
                # all other files get imported
                Set Variable [ $Image ; Value: MBS( "Container.ReadFile"; $FilePath) ]
            End If
            Set Field [ ImagePicker::Picture ; $image ]
            Commit Records/Requests [ With dialog: Off ]
        End If
        #
        # next
        Set Variable [ $index ; Value: $index + 1 ]
        Exit Loop If [ $index$ImageCount ]
    End Loop
End If
Set Variable [ $Image ; Value: MBS( "PhotoPicker.Clear") ]

See also

Example Databases

Blog Entries

This function checks for a license.

Created 28th September 2022, last changed 24th March 2023


PhotoPicker.Error - PhotoPicker.GetDisabledCapabilities