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

Hi There,

 

I need some help with performing a calculation on a field in a table based on the contents of another field in the same table.

 

The field I want base my calculation on is call Status whose content comes from a radio button set in a layout.

The radio button set has three options Outstanding, Won and Lost.

 

So I created a field called Outstanding set Type to Calculation and inserted the calculation: Case(Status = "Outstanding";1;0).

 

When I display the field in a report all the rows show the value as 0 when at least 50% of the should display 1 and the Status field displays one of the three options.

 

Then when I modified the calculation to use a different field (Sales Person) with a value of "JQ" it works as expected.

 

So my question is when performing the calculation based on a Radio Button Set do you have to base it on the Option Number and not the value.

 

I hope this makes sense.

 

Kind regards, Mark.

 

 

 

If the calculation returns 0, then Status ≠ "Outstanding". Which means that your data is not what you think it is. It could contain other values that are not displayed because the field is formatted as a radio button set. Or a trailing space or carriage return. Or any kind of garbage.

 

 

---

BTW,

 Case(Status = "Outstanding";1;0)

is a superfluous way to write:

Status = "Outstanding
  • Author

 

If the calculation returns 0, then Status ≠ "Outstanding". Which means that your data is not what you think it is. It could contain other values that are not displayed because the field is formatted as a radio button set. Or a trailing space or carriage return. Or any kind of garbage.

 

 

---

BTW,

 Case(Status = "Outstanding";1;0)

is a superfluous way to write:

Status = "Outstanding

Many thanks for your response.

 

I changed the calculation to use IF PatternCount >0 then 1 else 0, which works.

 

Regards, Mark.

I changed the calculation to use IF PatternCount >0 then 1 else 0, which works.

 

IMHO you should investigate the problem rather then sweep it under the carpet, so to speak.

  • Author

IMHO you should investigate the problem rather then sweep it under the carpet, so to speak.

 

I have found what my problem was:

 

I was using RightValues( Self ; 1 ) to input the radio set button value which causes a carriage return to be added to the end of the value.

I found out that by using GetValue( Self ; ValueCount( Self ) ) stops the carriage return being added to the end of the value.

 

I have tested and it works with my original calculation.

 

Regards, Mark.

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.