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

I have a strange calc problem which I would need some help with.

Basic

I have a 52 rep number field and a 52 rep calc field set to container result

Depending on the number value (nm) I want to get a pic from a container field.

This is my calc (shortened)B)

Let (

[

Nm=P_weeknm;

High=User Season::WeekHigh;

Low=User Season::WeekLow;

Bar1=Graphic::Weekbars1;

Bar2=Graphic::Weekbars2;

Bar3=Graphic::Weekbars3;

Bar4=Graphic::Weekbars4;

Bar5=Graphic::Weekbars5;

Bar6=Graphic::Weekbars6

];

Case(

Nm < GetRepetition(High;1);

GetRepetition(

Bar1;Round (nm;0))

;

GetRepetition(

Bar2;Round (nm;0))

))

It works good if the nm value is below 11, but then it doesn't show anything.

If I only have one case() option (or skip it) I get good values (but then it's useless...)

example:

Let (

[

Nm=P_weeknm;

High=User Season::WeekHigh;

Low=User Season::WeekLow;

Bar1=Graphic::Weekbars1;

Bar2=Graphic::Weekbars2;

Bar3=Graphic::Weekbars3;

Bar4=Graphic::Weekbars4;

Bar5=Graphic::Weekbars5;

Bar6=Graphic::Weekbars6

];

Case(

1=1;

GetRepetition(

Bar2;Round (nm;0))

))

Does anyone now what I'm doing wrong?

I am a bit confused by your calc. It appears you have several non-repeating fields in the mix - have you tried using Extend() around them?

  • Author

OK, didn't know about extend ..... maybe that's giving me some troubles ... and maybe my whole calc is a bad one ...

The case is this....

Nm = 52 rep

High = 6 rep

Low = 6 rep

Bar1 = 40 rep

Bar2 = 40 rep

Bar3 = 40 rep

Bar4 = 40 rep

Bar5 = 40 rep

Bar6 = 40 rep

... and the calc field has 52 reps

So all the fields have reps but only nm and calc field has 52. The extend function makes it possible to use a non-rep field (not the case here) if I've understood it correctly?

Could you perhaps post your file? There's too much going on at once - (relationships, multiple repeating fields) to spot the problem just from the information you provided.

Just a hunch - try, instead of this:

--------------------------------------

Case(

Nm < GetRepetition(High;1);

GetRepetition(

Bar1;Round (nm;0))

;

GetRepetition(

Bar2;Round (nm;0))

--------------------------------------

Let ( [

...

result1 = GetRepetition ( Bar1 ; Round (nm ; 0 ) ) ;

result2 = GetRepetition ( Bar2 ; Round (nm ; 0 ) )

] ;

Case(

Nm < GetRepetition ( High ; 1 ) ;

result1 ;

result2

)

)

  • Author

Made a new file with the same basic stuff, the calc ain't working good.....

test_1.zip

  • Author

And I tried your idea on my own file and sadly it didn't work out

Ok, a couple of things:

1. I have rewritten your calc, and it appears to work. I cannot tell you if that is a result of the rewrite - I simply had to rewrite it, otherwise I had no idea what I was testing.

2. When you refer from a repetition of one repeating field to another repetition of another repeating field - you will experience refresh problems. After changing the data in High/Low, I had to re-enter the data in WeekTime in order to get the correct display.

I have no idea what this is supposed to do, but I would consider moving some of the data, especially the highs and lows, out of repeating fields.

test.fp7.zip

  • Author

I don't know if I have some filemaker settings set falsly but there is no

difference in my file. I don't get bars in every field that has a nm value in the corresponding rep..... And the bars I get ai'nt the correct ones...

switching of the global storing of the active data fields give me the correctly related weekvalues, thats one good thing...

I have no idea what this is supposed to do, but I would consider moving some of the data, especially the highs and lows, out of repeating fields.

smile.gif Well.....

The thing I'm trying to accomplish is the following

It's a simple planning layout for a user.

The Nm field is the time he well train, one rep for each week of the year (time is set by a number)

Then in his user settings he has specified that for an example a heavy training week for him is between 12-15 h

If it's a recovery week the calc should get a bar from the Bar1 field,

if it's an easy from bar2 etc

  • Author

or perhaps it is working, I must have switched the bar fields in the test file, it is working, or at least i think it is..

Thanks comment smile.gif I'm very grateful for your help

I can't say I understand it completely, but I think you should consider:

(a) A record per user per week, instead of 52 repeats. For any kind of report, this will be essential.

(B) I would make the calculations work as pure numbers first, before dealing with the fancy display.

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.