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.

Featured Replies

Hello Everyone;

 

i am tyring to get a type ahead working on my system regarding point of sale. The only issue i see is taking teh user to another 

layout to use the following type ahead system:

	If ( start > WordCount ( haystack) ; 0 ; Let([     needle = LeftWords(needles; 1);     
	word = MiddleWords(haystack; start;1)     ];
	Case (     Left ( word; Length(needle) ) = needle;     
	If(         WordCount(needles) < 2; 1;         FindWordPartsInText(RightWords ( needles; WordCount(needles) -1); haystack ; 1) );
	FindWordPartsInText(needles; haystack;     start + 1)     )     ) )
	

I've spent a few minutes trying to decipher the calculation but gave up, too early in the morning.

A couple of thoughts:

- don't next IFs in CASE in IF: declare all you need to check up front in a LET() and do just one CASE; you'll thank yourself later and you'll make it easier to get help on what the calc is supposed to do

- avoid implicit result interpreting.  You call FindWordPartsInText() in both the IF and the CASE but you don't explicitly do a check that would rmake it clear what your intent is

FindWordPartsInText( something) = true

or

FindWordPartsInText( something) = false

or

FindWordPartsInText( something) > 0 or > 1

We can sorta guess what you mean but make it explicit so that we (and your future self) don't have to guess.  Explicitly state what you are checking.

 

As to your question: can you rephrase?  Why is going to a layout important?  And what is it that does not work?  You can't take the user to another layout?  Or you can but the calculation does not give you the result you need?

  • Author
39 minutes ago, Wim Decorte said:

I've spent a few minutes trying to decipher the calculation but gave up, too early in the morning.

A couple of thoughts:

- don't next IFs in CASE in IF: declare all you need to check up front in a LET() and do just one CASE; you'll thank yourself later and you'll make it easier to get help on what the calc is supposed to do

- avoid implicit result interpreting.  You call FindWordPartsInText() in both the IF and the CASE but you don't explicitly do a check that would rmake it clear what your intent is

FindWordPartsInText( something) = true

or

FindWordPartsInText( something) = false

or

FindWordPartsInText( something) > 0 or > 1

We can sorta guess what you mean but make it explicit so that we (and your future self) don't have to guess.  Explicitly state what you are checking.

 

As to your question: can you rephrase?  Why is going to a layout important?  And what is it that does not work?  You can't take the user to another layout?  Or you can but the calculation does not give you the result you need?

the calculation gives me NO RESULT on the layout i need it for. 

in your example it is not clear where the values from haystack and needles come from.  Can you post a real example showing where you get the data from?

  • Author
6 hours ago, Wim Decorte said:

in your example it is not clear where the values from haystack and needles come from.  Can you post a real example showing where you get the data from?

Portal Filter calculation:

 IsEmpty ( GLOBALS::g_lookUp ) or FindWordPartsInText ( GLOBALS::g_lookUp ; Customers::FullName; 1) 

Issue is if i am creating a new record: the Customers information is not stored.

Since Global searchfield is: a field in portal to trigger cf, then it does not find anything.

see file attached: layout ( work order):

 

Your Store.fmp12

  • 2 weeks later...
  • Author

Because of this issue, i have now learned about pickers and selector / connector. filemaker has grown so much. thanks Wim Decorte.

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.