0

I'm doing something wrong with this formula

I have Two Choice File one Status Example ( In Progress, Issue Client, Complete) , and Other Choice with Numbers (10%, 55% 100%)
The formula don't work

if Status = 2 then
    Hours * number(Choice = 1)
else
    if Status = 3 then
        Hours * number(Choice = 2)
    else
        if Status = 4 then
            Hours * number(Choice = 3)
        end
    end
end

6 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    You can’t filter a number() command. So try:

    if Status = 2 then
        Hours * 0.10
    else
        if Status = 3 then
            Hours * 0.55
        else
            if Status = 4 then
                Hours
            end
        end
    end
      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Fred Hi Fred other question. 

      If I Select on Status Choice Field Progress in the other Choice Hitos appears 15% in Progress and so on.

      • Fred
      • 1 yr ago
      • Reported - view

      Rafael ARe they simple choice fields? If so then what are the actual choice numbers for each choice in Status and Hitos?

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Fred Yes Fred are simple Choice

      On Status there are 1,2,3,4,5 items and on Hitos  only 1,2,3 items the idea is

      1 - if I select 2 on Status appear the 1 on Hitos

      2- if I select 2 on Status appear the 2 on Hitos

      3- and if I select 3 on Status appear the 3 on Hitos

    • Fred
    • 1 yr ago
    • Reported - view
    Rafael said:
    On Status there are 1,2,3,4,5 items and on Hitos  only 1,2,3 items

     Then you can try something like this in the Trigger after update of Status:

    switch Status do
    case 2:
        Hitos := 1
    case 3:
        Hitos := 2
    case 4:
        Hitos := 3
    default:
        Hitos := 0
    end
    

    I added the default so if you click on 1 or 5 it will erase what is in Hitos. You can remove that if that doesn't work for you.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 yr ago
      • Reported - view

      Fred Thank Fred Works 👍

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 6Replies
  • 68Views
  • 2 Following