Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5   13.0    Statistic    FMM    Blog  

PhotoPicker.File

Queries native file path for the image.

Component Version macOS Windows Linux Server iOS SDK
PhotoPicker 12.5 ❌ No ❌ 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

Created 28th September 2022, last changed 28th September 2022


PhotoPicker.Error - PhotoPicker.GetFileName

Feedback: Report problem or ask question.


Start Chat