0

Run a fórmula under two conditions

Is there a way that once I select Milestone1 Multiple Choice (dynamics) and the Real1 have a date, this formula will be executed (first((select Milestones where Id = 1).MLT) * Hours) / 100 on Earned1 field.

if Real1 != null and Milestones = 1 then
    (first((select Milestones where Id = 1).MLT) * Hours) / 100
end

No work need both conditions

4 replies

null
    • Rafael Sanchis
    • Rafael_Sanchis
    • 7 mths ago
    • Reported - view
    if Real1 != null and (select Milestones where Id = 1) then
        (first((select Milestones where Id = 1).MLT) * Hours) / 100
    end

    This works but when place Real1,  don't know if possible when both is selected, no only one.

    • Fred
    • 7 mths ago
    • Reported - view

    So are you saying the following code doesn't work?

    if Real1 != null and Milestones = 1 then
        (first((select Milestones where Id = 1).MLT) * Hours) / 100
    end

    Maybe put numbers() around Milestones so you force Ninox to use the record Id. It looks like record 1 in Milestones is also record Id 1 so this will work.

    Also, you said:

    Milestone1 Multiple Choice (dynamics)

    So your code won't work if you select multiple options.

      • Rafael Sanchis
      • Rafael_Sanchis
      • 7 mths ago
      • Reported - view

       Yes my problem is with select multiple options, I will try with Choice dynamic

      • Fred
      • 7 mths ago
      • Reported - view

      If it is just for you then you don't have to switch just remember that you can't select more than 1 milestone.

Content aside

  • 7 mths agoLast active
  • 4Replies
  • 42Views
  • 2 Following