Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
QuickList.JoinJSON
Joins text in a QuickList as JSON array.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
List | 13.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
List | The reference to the quicklist. | $List |
Result
Returns text or error.
Description
Joins text in a QuickList as JSON array.Values in the QuickList must be valid JSON.
See JSON.GetArrayItemsAsQuickList function to split JSON to a QuickList.
Examples
Try the function by adding three values:
Let([
list = MBS( "QuickList.New" );
r = MBS( "QuickList.AddValue"; list; "{\"id\": 1}" );
r = MBS( "QuickList.AddValue"; list; "{\"id\": 2}" );
r = MBS( "QuickList.AddValue"; list; "{\"id\": 3}" );
result = MBS( "QuickList.JoinJSON"; list );
r = MBS( "QuickList.Release"; list )
]; result)
Filter JSON items:
Set Variable [ $json ; Value: "[{\"id\": 1},{\"id\": 2},{\"id\": 3}]" ]
# turn into a list
Set Variable [ $list ; Value: MBS( "JSON.GetArrayItemsAsQuickList"; $json ) ]
#
# now loop over entries to filter
Set Variable [ $n ; Value: MBS( "QuickList.Count"; $list ) ]
If [ $n > 0 ]
Loop
# get next item
Set Variable [ $n ; Value: $n - 1 ]
Set Variable [ $item ; Value: MBS( "QuickList.GetValue"; $list; $n ) ]
#
# if meets criteria, then remove it
If [ JSONGetElement ( $item ; "id" ) = 2 ]
Set Variable [ $r ; Value: MBS( "QuickList.Remove"; $list; $n ) ]
End If
#
# next
Exit Loop If [ $n ≤ 0 ]
End Loop
End If
#
Set Variable [ $json ; Value: MBS( "QuickList.JoinJSON"; $list ) ]
Show Custom Dialog [ "after filter" ; $json ]
#
Set Variable [ $r ; Value: MBS( "QuickList.Release"; $list) ]
See also
- JSON.GetArrayItem
- JSON.GetArrayItems
- JSON.GetArrayItemsAsQuickList
- List.AddValue
- List.GetValue
- QuickList.Count
- QuickList.GetValue
- QuickList.New
- QuickList.Release
- QuickList.Remove
Release notes
- Version 13.3
- Added JSON.GetArrayItemsAsQuickList and QuickList.JoinJSON functions.
Blog Entries
- QuickList.JSONArray vs. QuickList.JoinJSON
- New in MBS FileMaker Plugin 13.3
- Neues MBS Plugin 13.3 für Claris FileMaker
- MBS Plugin 13.3 for Claris FileMaker
- MBS FileMaker Plugin, version 13.3pr1
This function checks for a license.
Created 31st May 2023, last changed 14th December 2023