0

Formula Problem

let myFrom := 'From Date';
let myTo := 'To Date';
select Documentos where FechaR1 <= myFrom or FechaR1 >= myTo and 'Horas Ganadas Real' = 0

I try to use these Formula but not working I need the Ganado REAL is empty. With null not working too

That means the Documents between From Date to Fecha Corte the FechaR1 is not Issue.

The other problem How can I do that for all FechaR1 to FechasR5

Thanks.

17 replies

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

    let myFrom := 'From Date';
    let myTo := 'To Date';
    select Documentos where FechaR1 <= myFrom or FechaR1 >= myTo and 'Ganado Real' = 0

    not work 'Ganado Real' is a Formula

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael can you try with text('Ganado Real')=null 

       does this work? 

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

    RoSoft_Steven Rooryck 

    let myFrom := 'Desde Fecha';
    let myTo := 'Fecha Corte';
    select Documentos where FechaR2 >= myFrom or FechaR2 <= myTo and text('Ganado REAL') = null

    Not work

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael select Documentos where FechaR2 >= myFrom and FechaR2 <= myTo and 'Ganado REAL' = null

      Does this gives the wanted result?

      Not? The try first with select Documentos where  'Ganado REAL' = null and then expand the formula...

      • Lars
      • 2 yrs ago
      • Reported - view

      Steven is right: If you want "Documents between From Date to To Date", then you have to use AND. Otherwise you get ALL dates before myTo AND ALL dates after myFrom - which is actually all dates

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

      RoSoft_Steven Rooryck

      Lars With the and don't give any result 

      With these Formula  are some better but not good saw some With Ganadas Real 

      let myFrom := 'Desde Fecha';
      let myTo := 'Fecha Corte';
      select Documentos where 'Ganado REAL' = null or FechaR1 >= myFrom and FechaR1 <= myTo

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael 

      let myFrom := 'Desde Fecha';
      let myTo := 'Fecha Corte';
      select Documentos where 'Ganado REAL' = null and FechaR1 >= myFrom and FechaR1 <= myTo

      Should give the right results. 

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

      RoSoft_Steven Rooryck 

      Thanks a lot excelent 

      The last Question there are some ways to place this Formula in a button? Because I need thar for all 5 FechasR1 to FechasR5

      Again Appreciate your help

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael there is a solution for that, if I understand you right, you want the view "No Emitidos" to be dependable of a button yes? I would use a choice field for that.

      Can you send me the database or can you invite me for your team (no need to have members available, Im having account also) so I can fix it for you?

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

      RoSoft_Steven Rooryck 

      Hi Steven I send the DB I send it via EMAIL too.

    • Ninox partner
    • RoSoft_Steven.1
    • 2 yrs ago
    • Reported - view

    For the community's interest, I've placed a choice field (Fecha) above the view (No Emitidos) where the selection can be done which column to filter.

    Formula in view:

    let myFrom := 'Desde Fecha';
    let myTo := 'Fecha Corte';
    switch number(Fecha) do
    case 1:
        (select Documentos where 'Ganado REAL' = null or FechaR1 >= myFrom and FechaR1 <= myTo)
    case 2:
        (select Documentos where 'Ganado REAL' = null or FechaR2 >= myFrom and FechaR2 <= myTo)
    case 3:
        (select Documentos where 'Ganado REAL' = null or FechaR3 >= myFrom and FechaR3 <= myTo)
    case 4:
        (select Documentos where 'Ganado REAL' = null or FechaR4 >= myFrom and FechaR4 <= myTo)
    case 5:
        (select Documentos where 'Ganado REAL' = null or FechaR5 >= myFrom and FechaR5 <= myTo)
    end
    

    Steven

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

    RoSoft_Steven Rooryck

    The Formula continue give me problems.

    (select Documentos where 'Ganado REAL' = null or FechaR1 >= myFrom and FechaR1 <= myTo)

    Example in the range of Dates between FechaR1 >= and FechaR1<= there are only 8 documents without  'Ganado Real'  75 have 'Ganado Real' and don't display the information correct. 😓

     The choice is correct 

    I thinks the problem is with 'Ganado Real' = null is the problems.

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael so if 'Ganado REAL' is NOT empty, they may not be displayed? Only the empty ones may show? If so we have to change the 'or' to 'and' in all the codelines.

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

      RoSoft_Steven Rooryck 

      If I change all or for and in all codeline no display anything. I need the empty 

      (select Documentos where 'Ganado REAL' = null and FechaR1 >= myFrom and FechaR1 <= myTo)

      • Ninox partner
      • RoSoft_Steven.1
      • 2 yrs ago
      • Reported - view

      Rafael I'm not sure but on my computer with my formula (with 'or') in the formula, I get all the empty 'Ganado REAL' records and also the records between the two dates. Isn't this correct?

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

      RoSoft_Steven Rooryck Ready Excelent 

      Thanks a lot Steven 

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

    RoSoft_Steven Rooryck Yes work, is ok but I think in display only the empty 

    But is ok Steven

Content aside

  • Status Answered
  • 2 yrs agoLast active
  • 17Replies
  • 146Views
  • 3 Following