Brian Dunning's FileMaker Custom Functions

JSON.GetValueLists ( isVirtualList )

This creates JSON that can be used to look up an id or JSON designed to populate a Virtual List

  Be the first to rate this function Log in to vote

Kyle Williams   Kyle Williams - Show more from this author
Augusto Digital
https://www.youtube.com/channel/UCpJlB7cmVNMjbjgY96MEsng

Share on Facebook Share on Twitter

  Sample input:
JSON.GetValueLists ( 1 )
JSON.GetValueLists ( 0 )
JSONGetElement ( JSON.GetValueLists ( 0 ), 4 ) = "Difficulty"
JSONGetElement ( JSON.GetValueLists ( 0 ), "Difficulty" ) = 4
  Sample output:
[
{
"id" : "1",
"name" : "CC_YearExp"
},
{
"id" : "2",
"name" : "Staff"
},
{
"id" : "3",
"name" : "Location"
},
{
"id" : "4",
"name" : "Difficulty"
},
{
"id" : "5",
"name" : "Time"
},
{
"id" : "6",
"name" : "Color"
}
]

-------------------------

{
"1" : "CC_YearExp",
"2" : "Staff",
"3" : "Location",
"4" : "Difficulty",
"5" : "Time",
"6" : "Color",
"CC_YearExp" : "1",
"Color" : "6",
"Difficulty" : "4",
"Location" : "3",
"Staff" : "2",
"Time" : "5"
}

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

I created this function to populate a virtual list portal and then realized that it might be nice to have an easy way to lookup a value list's ID by its Name or to be able to look up it's Name by its ID..

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 20 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: