0

ripete un controllo su tutti i record di una tabella

Salve, dovrei ripetere un controllo, per adesso tramite pulsante, che riempie un campo di un record dopo aver estratto il dato da un altro campo dello stesso record. A me servirebe che questa funziona sia eseguita su tutti i record. 

grazie

2 replies

null
    • Customer Service Ninox
    • Maria_pasini
    • 2 yrs ago
    • Reported - view

    Salve, potrebbe creare un pulsante con questo codice (adattato al suo caso):

    do as server
      for i in select 'Nome della Tabella' do
        let c := i.'Campo 1';
        i.'Campo 2' := c
      end
    end

    • Manager
    • Carmelo_Padula
    • 2 yrs ago
    • Reported - view

    GRazie Maria, era un po' piu' complessa, ma grazie al tuo suggerimento sono riuscito.
    Adesso ho un altro problema da risolvere: devo trovare la corrispondenza esatta del testo.

    Se ad es: s10 è "2UH00" il comando mi restituisce, trovandolo per prima "2UE00" non cerca esattamente i 5 caratteri.

    ho provato sia con like che con =, ma niente

    do as server
    for i in select demo do
    if substring(csSearch, 0, 2) = "10" then
    let s10 := i.substring(csSearch, 2, 7);
    let d10 := i.first(select TracciatoFipac where CSChild like s10);
    if d10 and d10.Condivisa != 1 then
    i.(CsMaster := d10.CSMaster)
    else
    i.(CsMaster := "Scarto10")
    end
    else
    if substring(csSearch, 0, 1) = "2" then
    let s2 := i.trim(substring(csSearch, 0, 5));
    let d2 := i.first(select TracciatoFipac where CSChild like s2);
    if d2 and d2.Condivisa != 1 then
    i.(CsMaster := d2.CSMaster)
    else
    i.(CsMaster := "Scarto02")
    end
    else
    let s := i.sede;
    let d := i.first(select TracciatoFipac where 'COD.SEDE' like s);
    if d and d.Condivisa != 1 then
    i.(CsMaster := d.CSMaster)
    else
    i.(CsMaster := "ScartoINps")
    end
    end
    end
    end
    end

Content aside

  • 2 yrs agoLast active
  • 2Replies
  • 384Views