I wanted to know what´s the best way to do a range of numbers with a LOGIC block. I want to test with an IF...Else, when the answer is the range of numbers from 11 to 20...but i dont want to do an IF block for every number in that range.
Would apprecciate some light into how this works, thanks!
I once programmed a tax table in a payroll program using a table based approach.
Load a CSV table from your Media folder (//) with 2 columns
base (minimum value) of range
applicable lookup result, like your text values
The table has to be in ascending order by column 1 (the range base).
To do the lookup, start at the end of the table (length of list) and descend (for each index from length of list(lookup_table) to 1 by -1) until K15SYS_100 >= (select item 2 from row number index of lookup table)
and break when your value exceeds the base of that row of the lookup table.
I am assuming your first row will be less than or equal to the lowest possible value of H15SYS_100.
Here is a sample table lookup by range, for single US Federal tax payers, loading the table from the Media folder ... tax_table_lookup.aia (5.9 KB)
Tax table CSV: Single.txt (116 Bytes)