August 23, 200520 yr Newbies hi, I have two fields 'fld1', 'fld2'. Both fields are a popup menu and can contain one of the following the values: 0,1,2,3,4,5,6,7,8 I have a third field that needs to contain the start value, all the values in between and then the end value. ie if 'fld1'=2 and 'fld2'=6 then fld3= 2,3,4,5,6 (with or without commas) I have tried to create a series of calculations, but I am stumped. Does anyone have a solution. It could be a script if it has to be, but it would be better as a calculation if possible. Thanks
August 23, 200520 yr Assuming you have validated that fld1 is no bigger than fld2. Then set up fld3 as an unstored calculation: MiddleWords( "0, 1, 2, 3, 4, 5, 6, 7, 8" ; Fld1+ 1; Fld2 - Fld1 + 1)
August 23, 200520 yr You need to make a Custom Function to use in this calcaulation. Make a Custom Function Range with the Parameters Start & End. The function looks like this: Case ( End > Start ; Range (Start; End - 1) & "," & End; End ) Now Define Fld3 as a text calculation = Range ( Fld1; Fld2 )
Create an account or sign in to comment