Brian Dunning's FileMaker Custom Functions

Accordion ( NumberedList ; selectedGroup ; showNumbers )

Given a numbered list and a selected group number, collapse all items in unselected group.

  Average rating: 4.1 (37 votes) Log in to vote

Bruce Robertson   Bruce Robertson - Show more from this author

Share on Facebook Share on Twitter

  Sample input:
Let( thisList = "1.0 Vegetables¶1.1 Peas¶1.2 Brocolli¶1.3 Brussel Sprouts¶2.0 Fruits¶2.1 Apple¶2.1 Pear¶2.2 Peach";
Accordion( thisList; 2; "")
  Sample output:
Vegetables
Fruits
Apple
Pear
Peach

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

Given a numbered list n.0, n.1, etc and a selected group,
collapse all items in unselected group.
You may pass group number or value of item 0 of selected group

1.0 Vegetables
1.1 Peas
1.2 Brocolli
1.3 Brussel Sprouts
2.0 Fruits
2.1 Apple
2.1 Pear
2.2 Peach

example:
Let( thisList = "1.0 Vegetables¶1.1 Peas¶1.2 Brocolli¶1.3 Brussel Sprouts¶2.0 Fruits¶2.1 Apple¶2.1 Pear¶2.2 Peach";
Accordion( thisList; 2; "")
result:

Vegetables
Fruits
Apple
Pear
Peach

Example file:
http://concise-design.com/downloads/accordion.zip

 

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 15 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: