Skip 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.

Multiple calculations on a field

Featured Replies

Hi.

I have a simple text field containing these values: "1¶ 2¶ 3¶ 4¶ 5¶ etc..". It is created by a value list (check boxes) containing these numbers. I want to create a calculation, probably a repeating one, containing field with a date plus each of these numbers.

For example:

3 fields

day...date...result (repeated field, date, d-m-y)

0....1-1-11..1-1-11

2....1-1-11..3-1-11

5....1-1-11..6-1-11

I tried to make it with the "extend" function, but it only calculated the last value.

Anyway I don't like using repeating fields, but I can't think of an other way.

It is a database that holds names and other data and use a portal to show the dates of an action each week. This portal is what I'm trying here.

Thanks for your help

Where is the initial date coming from?

  • Author

Just a simple date field that manually states the beginning of the week.

Try =

Let ( [

i =  Get ( CalculationRepetitionNumber ) ;

n = Extend ( NumberOfDays )

] ;

Case ( i ≤ n ; Extend ( StartDate ) + i - 1 )

)

Another option is to calculate the end date and make the relationship:

StartDate ≤ ActionDate

AND

cEndDate ≥ ActionDate

  • Author

Thanks Comment.

I don't need to get the dates like that. Let me explain it more..

The week starts on Saturday. There's a date field that I manually enter the date. Lets say "5/2/2011". I need to register the day that the action happened. For example Sunday, Tuesday and Friday. What I have is a value list containing these values: 0, 1, 2, 3, 4, 5, 6. These are the days after the starting date. Then there is a field "day" with checkboxes, with the header "Saturday, Sunday, Monday" and so on. So you check the boxes of the corresponding days. Here: "136". Then there's a repeating calculation field that have to do this: rep1= 1 + date field, rep2= 3 + date field, rep3= 6 + date field. So the results would be like this: rep1= "6/2/2011", rep2="8/2/2011", rep3="11/2/2011". Then I can have a report, that states who did the action everyday of the week.

I'm trying to get that result all day, today..

Thanks for your help

Does the order matter - or do you use this for a relationship only?

  • Author

No the order doesn't matter. As I see it, it's a case of creating a repeating field with each character of a simple field:

simple field = "5314"

repeating field= rep1 "5", rep2 "3", rep3 "1", rep4 "4"

I just tried to do it using " Left ( day ; Get ( CalculationRepetitionNumber ) )" but with no luck.

OK, so how about =

Let ( [

i =  Get ( CalculationRepetitionNumber ) ;

d = Extend ( MarkedDays ) 

] ;

Case ( i ≤ ValueCount ( d ) ; Extend ( StartDate ) + GetValue ( d ; i )  )

)

  • Author

Yes, yes...

Thank you very much. It's exactly want I wanted...

Now I need to study it and find out what was I supposed to do.

Thank you

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

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.