1

Formula don't work but no errors

I have this Formula but don't work,  the HITOS is a Multiple choice Dynamics with 5 Options. I Try with HITOS = number(5) but not work

if FechaF5 <= DataDate and FechaF4 != 0 then
    HITOS = 5
else
    if FechaF4 <= DataDate and FechaF4 != 0 then
        HITOS = 4
    else
        if FechaF3 <= DataDate and FechaF3 != 0 then
            HITOS = 3
        else
            if FechaF2 <= DataDate and FechaF2 != 0 then
                HITOS = 2
            else
                if FechaF1 <= DataDate and FechaF1 != 0 then
                    HITOS = 1
                end
            end
        end
    end
end

4 replies

null
    • Fred
    • 2 yrs ago
    • Reported - view

    Is this code in a formula field or code in a Trigger?

    • Rafael Sanchis
    • Rafael_Sanchis
    • 2 yrs ago
    • Reported - view

    Fred

    In a Formula

    • Fred
    • 2 yrs ago
    • Reported - view

    Are you trying to set the HITOS dynamic multi choice field with this formula field? If so a formula fields can not be used by themselves to set another field.

    You can use this code in a button or trigger at the field or table level. But before you do that you have to use a :=.

    if FechaF5 <= DataDate and FechaF4 != 0 then
        HITOS := 5
    etc....
    
      • Rafael Sanchis
      • Rafael_Sanchis
      • 2 yrs ago
      • Reported - view

      Fred 

      Ok thanks Fred understand 👍

Content aside

  • Status Answered
  • 1 Likes
  • 2 yrs agoLast active
  • 4Replies
  • 62Views
  • 2 Following