![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Aladino <borgobello-NO (AT) SPAM-alice (DOT) it> wrote: This is my attempt: SvuotaCampoMultiplo (campoMultiplo; elencoRipetizioni)= Let ([ $contatore=$contatore+1; campoMultiplo=If (elencoRipetizioni="" or ContaRicorrenze ( elencoRipetizioni ; $contatore ); campoMultiplo[$contatore]="") ]); If (contatore = Ultimo ( campoMultiplo ); campoMultiplo; SvuotaCampoMultiplo (campoMultiplo; elencoRipetizioni) ) but don't work :-( |
)
#4
| |||
| |||
|
|
It doesn't need to be that complicated. Repeating Fields are usually not a good idea since they are far too often a "pain in the sit upon" to use, but luckily in this one instance there is a far easier way. In any case, they semplfy very much my solution, and I won't do without |
|
FileMaker includes a function for setting all repetitions of a Repeating Field to the same data: the Extend() function. (Sorry, I don't know what the Italian name for it is - it will be listed in the Repeating Field Functions section of the Help File.) No problem. The Help file says the parameter for the function is a non-Repeating Field, but it could be worth trying a hard-coded value. e.g. Set Field [RepeatingField; Extend("")] This didn't work (with my FMA9) If the hard-coded value doesn't work, then you will have to create a Global Field of the same data type as the Repeating Field (temporaily put it on a Layout to make sure it is empty) to use instead - the Global Field should NOT be a Repating Field. e.g. Set Field [RepeatingField; Extend(g_BlankField)] I used a variable, that worked just fine. But this didn't alla that the |
#5
| |||
| |||
|
|
I used a variable, that worked just fine. But this didn't alla that the function should be able to do: empty only some repetitions. elencoRipetizioni should be a list of repetetion to empty... only if elencoRipetizioni is empty, the functions should delete all repetetion. Exemple: campoMultiplo[1]= a campoMultiplo[2]= a campoMultiplo[3]= a campoMultiplo[4]= a campoMultiplo[5]= a campoMultiplo = SvuotaCampoMultiplo (campoMultiplo; 2) campoMultiplo[1]= a campoMultiplo[2]= "" campoMultiplo[3]= "" campoMultiplo[4]= a campoMultiplo[5]= "" |
)
#6
| |||
| |||
|
|
the Extend() function. (Sorry, I don't know what the Italian name for it is - it will be listed in the Repeating Field Functions section of the Help File.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |