Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List function and pilcrows

Featured Replies

Can FM convert a return delimited list into values separated by pilcrows? Using the list function I obtained a field with a list of values:

BLB

BLG

BLK...

I want to use this field/list in the a Filter function. Can I use FM to convert this list to BLB¶BLG¶BLK so it can be used in a Filter calculation?

It is separated by pilcrows actually. You just don't see them.

BLB

BLG

BLK = BLB¶BLG¶BLK

A note about the list function. There is no pilcrow on the end. I sometimes use the list function to build lists of keys and such and when you remove a value make sure to remove the value and its pilcrow. In this way it is important to throw one on the end of a list function.

List ( Field ) & ¶

Hope this helps.

And another note... You may be looking for FilterValues instead of Filter. I am not sure of your application but I use this a lot with List ( ).

Edited by Guest

  • Author

I must be missing something.

Typing this list into a FilterValues function does not seem to work.

BLB

BLG

BLK

However this does

BLB¶BLG¶BLK

They don't work the same. If the values are not on one "line" in the calculation, the function does not work.

When testavailSizes contains

32

34

36

38

40

42

44

This calc returns only "40", not 30...40.

FilterValues ( "

30

32¶

34¶

36¶

38¶40¶SML¶MED¶LRG¶XLG" ;testavailSizes)

Ultimately, I want to use a field value for "textToFilter"

Indeed you are.

If you are explicitly referring to it in the calculation itself, it will strip it of the returns upon evaluation.

Therefore, if you put a carriage return in the middle of text it wont work. You have to use the pilcrow.

However, if you are referring to a field or result of a function such as List (), it will work.

Therefore, your calc could simply be:

FilterValues ( textToFilter; testavailSizes )

where both fields are lists.

Ah. Yes you are correct. If this was displayed a calculation result:

31

32

34 it would be equal to 31¶32¶34 "behind the scenes"

Inside a calculation dialog, FileMaker doesn't recognize line breaks the same way it recognizes a pilcrow.

I do not understand what it is your trying to do however. Can you explain and then I can suggest some code?

There is a difference between a carriage return typed into a field, and one typed into a calculation formula. A carriage return entered into a text constant of a formula is interpreted as a space*.

Example:

Let ( [

values = "a

b"

] ;

values = "a b"

)

returns TRUE.

---

(*) On a Mac, at least - YMMV.

Edited by Guest

  • Author

This is what I am trying to accomplish. If this is not over simplified...

Table A contains fields: Style, Color, Size.

There are many records for one Style, each with different color/size combinations.

Table B contains fields: Style, Description.

Each record has one style(unique), one description.

I want to show all the colors for each style (presumably in Table ???. The colors need to be sorted and not repeat.

Any help is greatly appreciated.

Draw a relationship between TableA::Style and Table B::Style Then, create a calc field in Table B with this calculation:

List ( TableA::Color )

In the attached sample file I replace the pilcrows with commas. Not sure how you want it displayed. If you want the available colors to be a value list, let me know and I can show you how to do that too.

I am not sure how you want these sorted but the sorting should be applied to the relationship between the two table occurrences.

ListFunction.fp7.zip

Edited by Guest

If you do not want colors to repeat, use a value list - see this recent thread:

http://www.fmforums.com/forum/showtopic.php?tid/209744/

Or, preferably, use a third table for colors, and take the list from there.

  • Author

Thanks. But,it falls apart when multiple sizes on one color are included. File attached.

ListFunction2.fp7.zip

  • Author

Using ValueListItems did the trick.

Thanks to everyone for the help!

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.