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 calculation that FM denies to execute...

Featured Replies

I have a headache of this. FM can not do this simple calculation because of the construction of the list.

See example below. How can we do this simple calculation?

TEST.zip

Edited by Guest

You have two problems with your list values.

Each value has a space behind it, and you currently are asking it to display a second field.

You only need to display the list, and remove the spaces.

HTH

Lee

  • Author

First I want to thank you for your response.

I will appreciate very much if you give the same example that I put above with your solution. I have to mention that I need to check first and second field in my lists otherwise the others lists do not work. I find also that when I use radio buttons the problem dissapears.

Pascal

The calculation will work with or without displaying the data in the second, once the space after the classes is removed in the list.

Lee

  • Author

Sorry for I am being bored but what do you mean with spaces? Problem of terminology I presume...

go you your layout Test 1 and put your cursor behind each of the items in your field [color:blue]ListValues and you will find a "space" behind them. Your field data is being thrown off by the space, so when the calculation looks for "C' CLASS", the field is actually "C' CLASS " so it will not equal what you are trying to match.

Lee

  • Author

How can I remove the spaces. I did the opposite, I copied from the calculation and then I paste it as a list value. Nothing happens..

Pascal

despair...

  • Author

When I check the classes as the first field of the list it works normally. I think that they are not the spaces behind the value lists.

whatever.

Hi

the problem was into your value list.

Fixed

TESTfixed.zip

Daniele,

Thanks for verifying my findings.

IMO, what they really need to do is to find the problem [color:blue]spaces in their data, as we both now have pointed out. This is really a lesson that [color:blue]Pascal needs to verify out. Otherwise, there is no understanding as to what you have corrected and what I have said.

Lee

Edited by Guest

  • Author

I do not dispute anything you say. But for this case there is a deeper problem. As you can see test.zip and testfixed.zip do not differ in typing right the spaces behind the values. In testfixed.zip file the list is nominated to show values only from first field in contrast test.zip is nominated to show values from the second field also with checked the option "show values only from second field". As I have said before this is the problem that brings me headache. FM does not read the "show values only from second field" option in calculations. As experts you have to see that I presume...

If the problem was the spaces behind the values FM should not work in both test and testfixed files.

Pascal

Edited by Guest

If the problem was the spaces behind the values FM should not work in both test and testfixed files.

Hi Pascal

this isn't true...

TestFixed has [color:red]2 fix !

1) Value list

2) ListValues (now definited as an autoenter calculation of: Trim ( ListValues )

So Lee is right ! He wished to point you that NO relationship ( with symbol = ) can work if the two items aren't EXACTLY the same...

... and "C' CLASS " isn't the same of "C' CLASS"

FM does not read the "show values only from second field" option in calculations.

Yes, Fm does !

But it shows values from second field and store the first !!

So your List field shows "C' CLASS" but store 3;

and the relationship is broken !

  • Author

You are right for the Test.zip I did not realize that have spaces. Sorry, that I was being bizzare in a way.

However, I did realize that FM can not do a calculation if the second field of the value is checked because the relationship is broken. This happens because it stores 3 and not "C' CLASS". So in the calculation we have to write 3 for the calculation to be done.

If I do a mistake please reply again if you have spare time.

Pascal

So in the calculation we have to write 3 for the calculation to be done.

Yesss !

You can change the calculation of "TestField" to:

If(List = 3; "This is the last class in the list")

  • Author

But this will not have a wide application because it is just a serial number nothing else. If someone change the list, delete or write again in the table, the list=3 will not have meaning for this calculation. We need something else..

Pascal

Noone said that your test file has a wide application... it was just a test !

What is the real problem ?

  • Author

I am working on an educational database project that is personal and I want to be an expert someday in this direction. If class is a school class then a user might delete or create a class C without necessary classID for class C=3 and the database become useless. In my educational datase also subclass list does not work if class does not have been checked with "show second field value" and "show only second field". Both of options are needed. But because of that you have mentioned I can not calculate other sizes as promotion or the graduate year because FM does not store the second field value.

Is a big question I think and a it will help very much if someone find how can we tell FM to store the value of the second field in lists in case that we want to use that value in calculations.

Will you attempt something like this?

Pascal

Pascal read this:

http://network.datatude.net/viewtopic.php?t=237

--sd

  • Author

Finally I did something that solve this problem permanetely. I created a table occurence and I connected all my calculations with the related field. Now when a value selected from the popup list the FM stores the ID code, the popup shows the second value but the calculations refer only to the table occurence of the related field. No spaces no disputable lists. I have to say that this forum help me so much to find solutions although sometimes friends can not tell me exactly the solution of the problem.

Pascal

sometimes friends can not tell me exactly the solution of the problem

No thats true, when USUALLY there's too little to go on! Let me show an example where it astonishes every one here:

http://fmforums.com/forum/showpost.php?post/234371/

...as if FMExperts is more autorative than other forums?? Alright it's from the "other" of your threads! Couldn't you at least provide us with the Nabble URL for the reply which apparently is indisputable, if I search for just Pascal in the nabble search engine how can I be sure it's you??

The overwhelming risk is that a newbe to a tool, put's too much prejudice into the matter and seeks to cover it up with spin. I usually use the metaphor making french fries with a tennis racket - for forcing a tool out of it's realm. Virtue here is long process of learning to pick the right tool for the right process.

There is a common european middleclass shenanigan, going "if I hand you a symbolic entity, and you give me one in return - are we both important" ...I'm afraid that you can't pick up pieces of filemaker tricks without thinking ...similar can't you expect a virtuosos in a certain area, have been all over the place.

Read the chess part of this:

http://www.fmforums.com/forum/showpost.php?post/228545/

--sd

While soren may come off a bit harsh, I think i agree with him here -- Our answers unfortunatley can only ever be as good as your questions.

For example, the question "Why won't my If statement work" can't really be answered very easily without more detail in the question. Or better yet: "If x+y=992 what integer does y equal?".

Further in FileMaker you have to remember that there is more than one way to do everything. Just because the "FileMaker experts" here don't suggest a particular method, it doesn't mean they haven't given it due thought, and discarded it because of issues like unecessary complexity, or otherwise they see that a particular method won't work if some other variable is brought in to consideration.

Anyway, that's all i think should be said about this issue.

I can't help but say :)

I love this forum :joust:

I hope we are all happy now.

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.