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

MBS FileMaker Plugin Example Databases

iOS Photo Picker

All examples are included with download of MBS FileMaker Plugin.

iOS Photo Picker.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts2
Value Lists1
Custom Functions0
Custom Menus24
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
ImagePicker
1 field defined, 0 record
ImagePicker

Fields

Table Name: ImagePicker - 1 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
PictureNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1

      Layout Objects: ImagePicker

      Regular Fields

      Field Name: ImagePicker::Picture
      Field PropertiesCoordinatesField FormatField BehaviorQuick Find
      • Top: 60 pt
      • Left: 10 pt
      • Bottom: 485 pt
      • Right: 314 pt
      • Anchoring: Left and Right, Top and Bottom
      Field Format:
      • Edit Box
      Field Behavior:
      • Allow field to be entered: In Find mode, In Browse mode
      • Touch keyboard type: Default for Data Type
      • Go to next field using: Tab key
      No

      Merge Fields

      Field PropertiesCoordinatesFieldsQuick Find
        Text:
      • Installed Plug-ins
      • Top: 504 pt
      • Left: 6 pt
      • Bottom: 600 pt
      • Right: 314 pt
      • Anchoring: Left and Right, Top
        No

        Buttons

        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Show Picker
        • Top: 11 pt
        • Left: 10 pt
        • Bottom: 41 pt
        • Right: 106 pt
        • Anchoring: Left, Top
        Perform Script [ “Pick”; Parameter: "PhotoLibrary" ]

        Scripts:


        Button PropertiesCoordinatesScript/Script Step
          Type:
        • Text: Examples List
        • Top: 11 pt
        • Left: 190 pt
        • Bottom: 41 pt
        • Right: 314 pt
        • Anchoring: Right, Top
        Select Window [ Name: "iOS Examples" ]

        Value Lists

        Value List NameSourceValuesOn Layouts
        ServicesCustom
        • Facebook, Twitter, SinaWeibo, TencentWeibo

          Script Hierarchy

          Pick
          GotImage

          Next Script: [GotImage]
          Script NamePick
          Run script with full access privilegesOff
          Include In MenuYes
          Layouts that use this script
          Scripts that use this script
            Script Definition
            Script Steps
            Fields used in this script
              Scripts used in this script
                Layouts used in this script
                  Tables used in this script
                    Table occurrences used by this script
                      Custom Functions used by this script
                        Custom menu set used by this script

                          Previous Script: [Pick]
                          Script NameGotImage
                          Run script with full access privilegesOff
                          Include In MenuNo
                          Layouts that use this script
                            Scripts that use this script
                              Script Definition
                              Script Steps
                              • Pause/Resume Script [ Duration (seconds): ,5 ]
                              • Loop
                              • Set Variable [ $BytesLoaded; Value:MBS("PhotoPicker.BytesLoaded") ]
                              • Set Variable [ $TotalBytes; Value:MBS("PhotoPicker.TotalBytes") ]
                              • Set Variable [ $ImageCount; Value:MBS("PhotoPicker.ImageCount") ]
                              • If [ MBS("PhotoPicker.IsLoading") ]
                              • Pause/Resume Script [ Duration (seconds): ,1 ]
                              • Else
                              • Exit Loop If [ 1 ]
                              • End If
                              • End Loop
                              • 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 [ No dialog ]
                              • 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") ]
                              Fields used in this script
                              Scripts used in this script
                                Layouts used in this script
                                  Tables used in this script
                                  Table occurrences used by this script
                                  Custom Functions used by this script
                                    Custom menu set used by this script

                                      Download example: iOS Photo Picker

                                      Used functions: