0

Formula fields show no data in table view

Sometimes my formula-fields don't show data in some records in the table view and the form view while in others the result is shown. My formula is correct because when renewing the window, the data is shown and other (formula)fields are empty. Could this have to do with the runtime that not all data is downloaded in time?

What could I do the get rid of this problem?

5 replies

null
    • John_Halls
    • 1 yr ago
    • Reported - view

    Hi

    Can you share with us the formula that you are using? Does it include a select command by any chance, as these don't update automatically?

    Regards John

    • Jarno_Vande_Walle
    • 1 yr ago
    • Reported - view

    Hi John,

    There is no select but this formula does refer to another series of formulas; below is the code I'm using. The first first part (if '# werven' = 1 then) are all formulas in the same table. The second part (if '# werven' > 1 then) are references to a subtable.

    if '# werven' = 1 then
        if sum(Prestaties.Laden) >= 0.25 and sum(Prestaties.Lossen) >= 0.25 then
            'Start lossen werf 1' - 'Start laden werf 1' + 'Lossen werf 1' - 'Pauze werf 1'
        else
            if 'Laden werf 1' >= 0.25 and 'Lossen werf 1' = 0 then
                'Stop werf 1' - 'Start laden werf 1' - 'Pauze werf 1'
            else
                if 'Laden werf 1' = 0 and 'Lossen werf 1' = 0 then
                    'Stop werf 1' - 'Start werf 1' - 'Pauze werf 1'
                else
                    if 'Laden werf 1' = 0 and 'Lossen werf 1' >= 0.25 then
                        'Start lossen werf 1' - 'Start werf 1' - 'Pauze werf 1' + 'Lossen werf 1'
                    end
                end
            end
        end
    else
        if '# werven' > 1 then
            if 'Start werf 1' = 0 then
                'Laden werf 1'
            else
                if sum(Prestaties.Laden) >= 0.25 and sum(Prestaties.Lossen) >= 0.25 then
                    max(Prestaties.'Start lossen') - min(Prestaties.'Start laden') -
                    sum(Prestaties.Pauze) +
                    sum(Prestaties.Lossen)
                else
                    if sum(Prestaties.Laden) >= 0.25 and sum(Prestaties.Lossen) = 0 then
                        max(Prestaties.'Einde werf') - min(Prestaties.'Start laden') -
                        sum(Prestaties.Pauze)
                    else
                        if sum(Prestaties.Laden) = 0 and sum(Prestaties.Lossen) = 0 then
                            max(Prestaties.'Einde werf') - min(Prestaties.'Start werf') - sum(Prestaties.Pauze)
                        else
                            if sum(Prestaties.Laden) = 0 and sum(Prestaties.Lossen) >= 0.25 then
                                max(Prestaties.'Start lossen') - min(Prestaties.'Start werf') -
                                sum(Prestaties.Pauze) +
                                sum(Prestaties.Lossen)
                            end
                        end
                    end
                end
            end
        end
    end
    
      • Jarno_Vande_Walle
      • 1 yr ago
      • Reported - view

      Actually, there is a select command in the formula's that are mentioned in the first section; here's the code:

      let x := number(Datum) + Medewerkers.Id;
      first((select Prestaties where 'Uniek nr.' = x or 'Unique nr.' = x).Laden)
      
    • John_Halls
    • 1 yr ago
    • Reported - view

    I see that the second line of your code says

        if sum(Prestaties.Laden) >= 0.25 and sum(Prestaties.Lossen) >= 0.25 then
    

    and I wonder if it should say

    if 'Laden werf 1' >= 0.25 and 'Lossen werf 1' >= 0.25 then
    

    I don't pretend to understand what your code is doing but this seems to fit the pattern better.

    Regards John

    • Jarno_Vande_Walle
    • 1 yr ago
    • Reported - view

    Thank you for the feedback, John. Your previous quote ("Does it include a select command by any chance, as these don't update automatically?") allowed me to solve the problem. I removed the select commands and the error doesn't appear to be there anymore. Thank you very much indeed! Just out of curiosity, is there a way (e.g. using a button) to update everything?

Content aside

  • 1 yr agoLast active
  • 5Replies
  • 199Views
  • 2 Following