Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
182 views
in Technique[技术] by (71.8m points)

javascript - I have a dropdown that contains two options, 'Approved', 'Denied'. I need to keep count for each option

This is what I have tried so far...I have to containers 'QuickClose_Approved and QuickClose_Denied. It counts the first occurence, but not subsequent selections.

if(ev.TableandFieldName=="ExtendedFields.Rush2ActionTaken")  {

var count = 0
var counter = count+1

if(los.GetField("ExtendedFields.Rush2ActionTaken")=="Approved") {
los.SetField("ExtendedFields.QuickClose_Approved", counter)
}
if(los.GetField("ExtendedFields.Rush2ActionTaken")=="Denied") {
los.SetField(ExtendedFields.QuickClose_Denied", counter)
}
};
question from:https://stackoverflow.com/questions/65890898/i-have-a-dropdown-that-contains-two-options-approved-denied-i-need-to-kee

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
//var counter = 0

if(ev.TableandFieldName=="ExtendedFields.Rush2ActionTaken")  {

  var counter = counter + 1

  if(los.GetField("ExtendedFields.Rush2ActionTaken")=="Approved") {
    los.SetField("ExtendedFields.QuickClose_Approved", counter)
  }
  if(los.GetField("ExtendedFields.Rush2ActionTaken")=="Denied") {
    los.SetField("ExtendedFields.QuickClose_Denied", counter)
  }
};

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...