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.

Type ahead search for portal

Featured Replies

Hi all

I have a semi-working script to filter a portal in real time based on what the user begins to type to search within the portal. I've modified my filter calculation so many times I've ended up confusing myself.

I have two filter requirements that need to work in conjunction with one another, regardless if the user is utilizing both filtering options.

"Filter 1" is the type ahead field - a global (company search ahead) that uses a custom function, and "Filter 2" is a field with checkboxes - a global (company filter type) - that allows me to further filter based on the record's user entered status (company status). The filter calculation below works if the user types ahead and then applies the "filter type", however the found records displayed aren't always correct when I apply "filter 2", and I can't just utilize "filter 2" without something being typed into "filter 1". 

If someone can help me untangle myself from this mess I'd really appreciate it.

Case(

IsEmpty ( Company::Company Search Ahead )
or
ClientTypeAhead ( Company::Company Search Ahead ; Company Selector::CompanyName ; 1 ) ;

IsEmpty(Company::Company Filter Type) ; Company Selector::CompanyID = Company::CompanyID ;

ValueCount ( FilterValues ( Company::Company Filter Type ; Company Selector::Company Status ) )

)

Edited by madman411

Treat the two filters (and their two respective states) as separate predicates. Try …

( IsEmpty ( Company::CompanySearchAhead ) or ClientTypeAhead ( Company::CompanySearchAhead ; CompanySelector::CompanyName ; 1 ) )

and

( IsEmpty( Company::CompanyFilterType ) or CompanySelector::CompanyID = Company::CompanyID )

i.e. ( Filter1Empty or Filter1Match ) and ( Filter2Empty or Filter2Match ) must be true for a record to pass muster.

I left away the FilterValues() expression since I've no idea what it is supposed to do.

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.