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.

Finding in a Calc field based on a relationship

Featured Replies

  • Newbies

Hi,

I am having a weird find issue. Basically I have a calculation field based on a relationship with the following calculation:

If( IsValid(Import_Wk3::COM_FK) ;

"Y";

"N")

I am trying to determine if a record has a related record in another table. the field is displaying correctly however when I perform a find, all of the records are returned.

Any ideas are appreciated.

-James

That's not the way to do it, go to the other table and:

Show Every Record

GTRR(FS)

...since you're on fm8, while earlier versions must use:

http://www.kevinfrank.com/download/multi-gtrr.zip

--sd

A find in the main table, looking for records which have related records works fine. While true IsValid() can produce expected results (it only tests that the data is valid for the field type), it would still work only if partly. To test for related, the IsEmpty() test works better. But are you saying the calc displays N but still finds all main records when you search for Y?

Two things I might suggest: 1) What version of 8 are you using? 8.0v1 had finding issues (would produce all records on unstored calcs) or 2) If you are using a Find Request, the wrong field may be searched so you might check that. Can you manually perform the find and have it work? If not, I would suspect your version; particularly if mixing 8.0v1 with vs. 7.

Another test ... place your related key directly on the main layout and perform manual find with *. Only main records which have a related record will be displayed.

Unpredictable results in searches can also stem from, forced typecasts, if say the calc'fields result type is number while your calc as such returns a "char"!

--sd

  • Author
  • Newbies

Thanks for the tips.

It is just strange that the field displays properly but does not search properly. My work around has been to run the same calculation as a replace into a text field, then search the text field.

I am running Server 8 v2. I will have to upgrade at my next maintenance window.

But you know what, my client version is Advanced 8 V1, I bet the find is run client side huh?

It is just strange that the field displays properly but does not search properly

Am I getting thru here?? It's a Edward Said'ish way of arguing here. If you search a number field with a char is it type mismatch, which might or might not give your the results you're after.

In short what type are the result of you calc as type, if it's number is it wrong! The tool might forgivingly allow you lack of strictness in the approach, at some points, but don't expect it to happen universally ...it's quite a permutation to cover all the ways users might abuse the tool.

Let it be obvious that artifical intelligence still is pretty unapproachable and the perfect software tool never ever will be made.

--sd

  • Author
  • Newbies

Hi Soren,

Sorry, I was not responding directly to your post. I tried the calc as both a text, the way posted, and a boolean Number, without the If statement. Both calculations would display as desired but would return all records on any search of the field.

More details: The calc was unstored, had to be since it refereced a related field. And I tested with "evaluate with empty fields" on and off.

But it does look like a search bug with 8v1 Advanced. Updating to 8v3 Advanced solved the issue. That's what I get for ignoring basic troubleshooting procedure.

Thanks again,

-James

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.