Expand my Community achievements bar.

Latest Community Ideas Review is Out: Discover What’s New and What to Expect!
SOLVED

Looking Custom form Calculated Field Suggestion?

Avatar

Level 10

HI,

I created a calculated field, but then I have to select one of them from field name DSC11 or DSC12. But how to implement in calculated field.

Possible to add only one field either from DSC11 or DSC12 selected and calculated here?

I am not such good in writing calculated expressions.

A screenshot view is attached here for your reference.

Mvh

kundan

0694X00000G9jaKQAR.jpg

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Level 4

Hi Kundan!

The outputs for DSC11 & DSC12 are strings, not integers. So if you wanted to extract a number from those fields, are you just wanting to capture the first number in the selection? So if someone selects "5 - For value more than...", you'd want the sum to capture the value "5" and then add that to the rest of the formula, correct?

If that's the case, I'd recommend seeing if the following would return a value:

SUM(DSC1,DSC2,DSC3,DSC4,DSC5,DSC6,DSC7,DSC8,DSC9,DSC10,IF(ISBLANK(DSC11)&&ISBLANK(DSC12),0,IF(ISBLANK(DSC11),NUMBER(LEFT(DSC12,1)),NUMBER(LEFT(DSC11,1)))))

The "IF" statements first checks to make sure that there's a value in one of the fields - if no value is found, it returns "0". From there, it tries to configure a value for the option selected, by grabbing the first LEFT character of the selection, then forcing it into a NUMBER.

I tried to test the formula in our own environment but we don't have any fields where the selections begin with a value, so I figured it might be easier to just have you test it and we can troubleshoot from there.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 4

Hi Kundan!

The outputs for DSC11 & DSC12 are strings, not integers. So if you wanted to extract a number from those fields, are you just wanting to capture the first number in the selection? So if someone selects "5 - For value more than...", you'd want the sum to capture the value "5" and then add that to the rest of the formula, correct?

If that's the case, I'd recommend seeing if the following would return a value:

SUM(DSC1,DSC2,DSC3,DSC4,DSC5,DSC6,DSC7,DSC8,DSC9,DSC10,IF(ISBLANK(DSC11)&&ISBLANK(DSC12),0,IF(ISBLANK(DSC11),NUMBER(LEFT(DSC12,1)),NUMBER(LEFT(DSC11,1)))))

The "IF" statements first checks to make sure that there's a value in one of the fields - if no value is found, it returns "0". From there, it tries to configure a value for the option selected, by grabbing the first LEFT character of the selection, then forcing it into a NUMBER.

I tried to test the formula in our own environment but we don't have any fields where the selections begin with a value, so I figured it might be easier to just have you test it and we can troubleshoot from there.

Avatar

Level 10

Thanks a lot @Chloe Rock‚

I will refer your recommendation and come back to you.

Have a nice day!

Mvh

Kundan,.