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

4replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
    • Fred
    • Fred
    • 1 mth ago
    • Reported - view

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

    Like
    • Rafael
    • Rafael Sanchis
    • Rafael_Sanchis
    • 1 mth ago
    • Reported - view

    Fred

    In a Formula

    Like
    • Fred
    • Fred
    • 1 mth 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....
    
    Like
      • Rafael
      • Rafael Sanchis
      • Rafael_Sanchis
      • 1 mth ago
      • Reported - view

      Fred 

      Ok thanks Fred understand 👍

      Like
Like1 Follow
  • Status Answered
  • 1 Likes
  • 1 mth agoLast active
  • 4Replies
  • 28Views
  • 2 Following