• Evrydiki
  • NEWBIE
  • 10 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

I have a field of total machines and some fileds giving the specs. The machines might be of type A or type B.
The user needs to fill in the total number of machines that need to be changed in a factory. Then, depending on the specs that the user will fill in for each of the changes (max 5 changes per request), I need to calculate how many machines are of type A and how many are of type B.

The number of machines for both types are calculated in formula [number] fields and I currently have this formula. However, this only takes into account the first spec:

IF((ispickval(Machine__c,'A')) ,(IF((ispickval(Machine2__c,'A')) ,(IF((ispickval(Machine3__c,'A')) ,(IF((ispickval(Machine4__c,'A')) ,(IF((ispickval(Machine5__c,'A')) ,(i__c+1), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c))

The above example refers to one of the machine types. "i" is a temp variable with an initial value of 0.

The MachineX__c fields can be either all blank or any of the fields can be filled in.

Could someone please help? Thanks!
Evrydiki
Hi,

I have a field of total machines and some fileds giving the specs. The machines might be of type A or type B.
The user needs to fill in the total number of machines that need to be changed in a factory. Then, depending on the specs that the user will fill in for each of the changes (max 5 changes per request), I need to calculate how many machines are of type A and how many are of type B.

The number of machines for both types are calculated in formula [number] fields and I currently have this formula. However, this only takes into account the first spec:

IF((ispickval(Machine__c,'A')) ,(IF((ispickval(Machine2__c,'A')) ,(IF((ispickval(Machine3__c,'A')) ,(IF((ispickval(Machine4__c,'A')) ,(IF((ispickval(Machine5__c,'A')) ,(i__c+1), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c+1)) ), (i__c))

The above example refers to one of the machine types. "i" is a temp variable with an initial value of 0.

The MachineX__c fields can be either all blank or any of the fields can be filled in.

Could someone please help? Thanks!
Evrydiki