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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DragDrop.GetPathCount
Returns the number of file paths.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DragDrop | 2.4 | Yes | Yes | No | No | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| droparea | The reference ID for this drop area. Use functions like DragDrop.CreateWithControl to create a drop area. | $dropHandle |
Result
The number of paths.
Description
Returns the number of file paths.Call this function in the drag action script.
Added Windows support for MBS Plugin 8.1.
Examples
Stores files in records:
Set Variable [ $dropview ; Value: Get(ScriptParameter) ]
Set Variable [ $count ; Value: MBS("DragDrop.GetPathCount"; $dropview) ]
// Show Custom Dialog [ "Number of files: " & $count ]
Set Variable [ $index ; Value: 0 ]
If [ $count > 0 ]
Loop
Set Variable [ $OSPfad ; Value: MBS("DragDrop.GetPath"; $dropview; $index) ]
Set Variable [ $FMPfad ; Value: MBS( "Path.NativePathToFileMakerPath"; $OSPfad) ]
#
If [ MBS("Files.FileExists"; $OSPfad) ]
Go to Layout [ “MIX” ; Animation: None ]
New Record/Request
#
Set Field [ MIX::Path ; $OSPfad ]
Set Field [ MIX::Name ; MBS( "Path.LastPathComponent"; $OSPfad ) ]
#
Go to Field [ MIX::Image ]
Insert Picture [ Reference ; “$FMPfad” ]
#
Commit Records/Requests [ With dialog: Off ]
Go to Layout [ original layout ; Animation: None ]
End If
#
Set Variable [ $index ; Value: $index+1 ]
Exit Loop If [ $index = $count ]
End Loop
End If
See also
- DragDrop.CreateWithControl
- DragDrop.GetEmailCount
- DragDrop.GetPath
- DragDrop.GetPicture
- Files.FileExists
- Path.LastPathComponent
- Path.NativePathToFileMakerPath
Example Databases
- Drag and Drop/DragTest Popover
- Drag and Drop/DragTest
- Drag and Drop/for Mac/DragTest multiple picture files
- Mac and iOS/Machine Learning/Core ML Photos
Blog Entries
FileMaker Magazin
Created 18th August 2014, last changed 8th February 2018
DragDrop.GetPath - DragDrop.GetPicture
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins