Calculated field on Selection of another field. | Community
Skip to main content
New Participant
July 13, 2023
Solved

Calculated field on Selection of another field.

  • July 13, 2023
  • 2 replies
  • 1316 views

I want to set up a calculated field to have a pre-set value based on a selection of another field (radio button). So suppose one radio button have 4 options a,b,c and d, I want to have a calculated field that shows 1 for a, 2 for b, 3 for c and d.

Is it possible?

 

Thanks,

Nisha

Best answer by NishaPatel

Thanks, this is working for me 🙂 

2 replies

Employee
July 19, 2023

Fields:

Radio Type = A, B, C, D

Calculated field = 

IF({DE:Radio Type}="A","1",
IF({DE:Radio Type}="B","2",
IF({DE:Radio Type}="C","3",
IF({DE:Radio Type}="D","4"))))

NishaPatelAuthorAccepted solution
New Participant
July 19, 2023

Thanks, this is working for me 🙂 

RandyRoberts
New Participant
July 13, 2023

This is possible but the caveat is the form has to be refreshed before any calc takes place. This is usually done by selecting "Recalculate Expressions" from the elipsis menu on the Project.

Kundanism
New Participant
July 14, 2023

Possible to get the code for the same?

🙂

New Participant
July 14, 2023

Yes Please.