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.

A specific search for text

Featured Replies

Hey everyone...I'm a newbie...and I'm sorry for probably asking such an elementary question but here it goes:

I need to find a way that when they click on the button it does a search for data that contains the year 2003 and for a specific college name and then sort it and put it in a list layout.

IE: "Jane" is wanting to apply for an internship with Converse College, "Sally" needs to find out what times she's got available for her to come and interview with. So "Sally" needs a button that does a find for Converse College and the year 2003, and display the info in a list format so that she can tell "Jane" when to come.

The names of the fields that the info is in are, Year Apply For and Interview Location #2...how can I make a search happen automatically with the press of a button?

Thanks for your time everyone,

Jami

Is the original information (iow Jane's request) obtained from an unformated text field as stated in your post or it is structured for ex.like:

Contact : Jane

Place: Converse College

Date: 2003.

If non formated than first a little preambula:

Usually when your entity (an real or abstract concept rapresented by table or file using FM notations) contains non formated text fields containing informations regarding it, there is something wrong in the design of your DB.

Now we'll find the solution even in this case, but first, let's deal with the standard case (the one when the original request come in structured form)

You'll need few globals if you want to use "classic find" (or an multi key based relationship in relational find approach)

If using Find than create two global fields of type text.

Now before entering find mode set those globals with values from structured request and perform find (well if you don't have indexed e/o calculated field year you'll have to perform find on range:

1-1-2003...12-31-2003)

In relational approach you'll need to create additional keys in your DB

It could be as simple as year & place & avialable , where available is an flag(probably indicating record with available dates)

So when new request arrives concatenate the year and the place and display in portal (if any) avialable dates.

But if your incoming request comes from an unstructured text field, you'll need to extract first the informations you need and than apply either find or relational approach.

Now, the part reguarding the extracting date is pretty simple:

create an calculation text field

extractedyear=case(patternCount(yourTextFieldContainingRequest,Year(Status(Currentdate))),Year(Status(Currentdate)),Year(Status(Currentdate)))

Tha part for extracting interview place is more complex, indeed you'll need an script to perfotm the task.

But first define an value list "Places" as use values from field "Interview Location".

Also create few more global text fields "temp", "match", "current" and one global numeric field called counter.

Here's the script

  

Set error capture [on]

Freeze Window

Set Field[temp, Substitute(ValueListItems(Status(CurrentfileName),"Places")," ","-")]

Set Field [counter, WordCount(temp)]

IF(COUNTER)

loop

exit loop if [patternCount(yourTextFieldContainingRequest,Substitute(MiddleWords(temp,counter,1),"-"," "))

or counter=0]

set field[counter,counter-1]

end loop

Set field [match,Case(counter,Substitute(MiddleWords(temp,counter,1),"-"," ")]



The match field migth contain the place , since the script could be invalidate by insertion errors in your original text field like "Conberse College" instead of "Converse College".

HTH

Dj

There were 2 errors in the script, now corrected.

Dj

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.