Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 211
  • Last Modified:

Fix to counter

I have a counter that tallies up the count of a bunch of fields. The formula is below, I have added a new field with is used when there are over 25 values. I need to know how I can modify this formula to add in the value from this field, "midas_over" it is a text field so it would have to be converted to number and it will just add as a single value. So if the original counter below gets to 25 and the new field has 10 over, then the final count will be 35.

list:=@Trim (midas1:.....:midas25);
n:=@Elements(list);
FIELD count_midas:=n-@Elements(@Trim(@Replace(list;"midas";"")));""
0
jforget1
Asked:
jforget1
  • 2
  • 2
1 Solution
 
Steve KnightIT ConsultancyCommented:

Sounds kinda odd but you know your app :-)  Any reason why the other field is text for instance?

list:=@Trim (midas1:.....:midas25);
n:=@Elements(list);
over:=@If(midas_over!="" & @IsNumber(midas_over);@TextToNumber(midas_over);0);
FIELD count_midas:=over+(n-@Elements(@Trim(@Replace(list;"midas";""))));

""
0
 
jforget1Author Commented:
This is a temporary fix while I work on a multi value field attendance system using dialog boxes for entry, just can't get it quite right. Appreciate the help with the code.
0
 
jforget1Author Commented:
I did change the field over to a number field, eliminated some of the unneeded code, thanks again.
0
 
Steve KnightIT ConsultancyCommented:
No problem, glad to help
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now