Search found 383 matches

by Ron Melby
22 Aug 2019 00:53
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

Name S Dates SVCDate War ARM Rank OTH COVEY, James Jr. (IV) M (1715 - 1782) 1756-1763 French and Indian Wars COVEY, Joseph Sr. M (1754 - 1839) Sep 1775 Revolutionary War Militia PVT COVEY, Kenneth William M (1915 - 1988) WWII US Army TEC5 COVEY, Marvin Clifford M (1894 - 1960) WWI COVEY, Roger L. M...
by Ron Melby
21 Aug 2019 14:58
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

I am going to try it when I get home. looks like a simple enough deal
by Ron Melby
21 Aug 2019 13:30
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

Thanks that solved it. the error returned is wrong. running around chasing the wrong error. the upshot is you may not glue up or make the a < b statement a variable it doesn't do recursive gluing. it has to be an 'object' statement so, in my code it will have to be a series of elseifs if dir = '<' t...
by Ron Melby
20 Aug 2019 22:43
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

USRIDX has 194 entries as I expect, and in the form I expect. The range from 1 to 194 no gaps there are no entries that contain nil nor even '' typical entries are: [5] => (table .2) KLIST => "MELBY, Ronald Nolan 1972-1975 (1954 - )" IDX => 5 [6] => (table .2) KLIST => "NEWTON, Lyle Delane (1952 - 2...
by Ron Melby
19 Aug 2019 16:01
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

At the outset, way back when I was doing relations and that table build, it became clear that the 'RCD' build you advocated is the way to go, it is far and away number 1. That is why I am changing the operation of my _STD_xxx modules. it will be my way forward. However, until that is done, and in th...
by Ron Melby
17 Aug 2019 23:52
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

local function karg(tbl) local ct = 0 local ktyp = '' local vtyp = '' local typ = type(tbl) if typ ~= 'table' then return nil end for k, v in pairs(tbl) do ktyp = type(k) vtyp = type(v) if ktyp ~= 'number' then if vtyp == 'table' then ct = ct + 1 elseif vtyp == 'string' then return 1 end end end re...
by Ron Melby
17 Aug 2019 16:21
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

this problem is the most perplexing for me yet. requirement of the function rtv(): all tables involved are [rrn]'blahblahblahyaddayaddayadda' form (arrival, or array, whichever you like) case1 = ({tblName; tblSVC; tblWar; tblDates}) rtx = rtv(case1) case2 = ({tblName;}) rtx = rtv(case2) case3 = tblN...
by Ron Melby
16 Aug 2019 06:17
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

I must say the new server is very snappy.
by Ron Melby
16 Aug 2019 06:15
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

the intent was to get the number of entries really. consider the statement as I was making it to mean loop thru the number of entries that are contained in the leftmost key, whether those other tables are longer or shorter. anyway, sorted I did not use ipairs or pairs. it actually, really came to me...
by Ron Melby
14 Aug 2019 22:58
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

yeah, I am well aware that for k, v in tbl{1] does not loop thru tbl1 2 and three

K=1 to #tbl do
this = tblK]
end

that revolves me around in the array of table names. fourth time posted.
by Ron Melby
14 Aug 2019 21:28
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

this look familiar at all? function bldKLIST(tbl) local KEYVAL = {} local tbl = tbl for k, v in ipairs(tbl[1]) do local KEY = '' ** for K = 1, #tbl do ** KEY = KEY .. v.tbl[K] <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<ERROR ** end table.insert(KEYVAL, KEY) end return KEYVAL end third time I have posted it ** t...
by Ron Melby
14 Aug 2019 20:43
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

for k, v in ipairs (tbl[1]) do

do not know how to loop thru multiple tables in an array in a loop repeatedly, k by k

for _, strType in ipairs ( { 'INDI'; 'FAM'; } ) do
is not what I want, if it is what you are asking....run thru [1] then [2] serially.
I want to run thru [1] and [2] in parallel
by Ron Melby
14 Aug 2019 20:11
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

I do not, know how to do this, because that is what I am trying to do: for k, v in an unknown number of tables (whose names I will not tell you) for each record{k] I need v in tbl[from 1 to number of tables] that have the key[k] do not know how to do that. I can read one table, and I can get values ...
by Ron Melby
14 Aug 2019 17:53
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

v is correct in the first part of the loop before I execute the line in error, then I get the index error set off by **** v is the value in v.tblname and we would expect that to be so because that is tbl[1] record[k=1] ok thats fine, I dont need v.tbl[K] in code but now I need the loop to get v from...
by Ron Melby
14 Aug 2019 17:30
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

tbl = {tblName, tblWar, tblDates} function bldKLIST(tbl) local KEYVAL = {} for k, v in ipairs(tbl[1]) do local KEY = '' for K = 1, #tbl do KEY = KEY .. v.tbl[K] ****** attempt to index field 'tbl' (a nil value) end table.insert(KEYVAL, KEY) end return KEYVAL end I am trying to code: for as many entr...
by Ron Melby
14 Aug 2019 12:14
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

once again the objective of the script is general in nature. given 1 to n number of tables where the entries are k, v only i want to take k order for every table and for those one to n tables i want to: composite field = v.tbl one .. v.tbl two ... v. tbl three ... v. tbl n table.insert(composite, co...
by Ron Melby
14 Aug 2019 12:07
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

multiple wars per person is not crucial, as I have explained before multiple wars get multiple records. sort by war, sort by person so some of the entries for war may be: ' ' American Revolution War of 1912 Indian Wars WWI WWII Korea Vietnam will use multiple entries. sort those in order a.WAR < b.W...
by Ron Melby
14 Aug 2019 01:13
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

general case, from 1 to n tbl (an array of tbl) in this case: tbl = {tblDATES, tblNAME, tblSEX) (for the purposes of this code, assume that either tbl[1] has equal or more entries than the other tables. insofar as I can imagine tbl[1]...tbl[{n] will always have equal number of entries. tblDATES = [1...
by Ron Melby
13 Aug 2019 17:41
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

my whole post disappeared. bottom line I have hundreds of modules to revamp have read the documentation and want to check my understanding of how its going to work. Dont count me out on penlight without checking with me, I will be studying it as time permits to understand it. So do not bow or curtsy...
by Ron Melby
13 Aug 2019 12:53
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

I thought that, and it sort of gums up the works (but maybe not) function matID(varptr) local rcdid = fhGetRecordId(varptr) local cs = debug.getinfo(2, 'n') if cs.name ~= 'rtvID' then RCD[#RCD].RCDID = rcdid cwrcd = 6 cwfam = 6 end return rcdid end -- fn matID function matSEX(iptr) local sex = strin...
by Ron Melby
13 Aug 2019 12:10
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

the question I have and cannot solve and am asking is:

I insert an empty record, ok...then I fill in the parts. I am now at record key one, finished with my first indi. how do I write that record, or has it filled out the table entry, after the insert, and how is the record advanced to the next?
by Ron Melby
12 Aug 2019 20:38
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

there are two situations to generalize. one record per indi (of whatever) and n records per indi while some attribute or fact exists say -- census. if it is necessary to make the code general -- in the case of a multiple record, the field in RCD as we have been discussing could be WAR{} (an array) a...
by Ron Melby
12 Aug 2019 17:57
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

[1] FRED [2] AL [3] BEN these are arrival order by doing a: while ptrINDI is not null loop reading from first record to last I sort the thing, giving me the index to the table in values of alpha order. keys will return: {2,3,1} write out by key. I am not near LUA at the moment so I am sort of psuedo...
by Ron Melby
12 Aug 2019 16:57
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

that part about cutting apart I understand Mike. fn matName(iptr) tblGED(RCD = RCD or {}) Name =NAME:SURNAME_FIRST tblGED(RCD{NAME=Name}) end fn matSEX(iptr) tblGED(RCD = RCD or {}) sex = sex:substr(1, 1) tblGED(RCD{SEX=sex}) end while indi is not null do tblGED(RCD=nil) matNAME matSEX table.insert(...
by Ron Melby
12 Aug 2019 13:24
Forum: Plugin Discussions
Topic: sorting tables by v
Replies: 54
Views: 989

Re: sorting tables by v

thanks, pretty techie, gonna have to give that a long long long think and read....so far, greek to me. I have realized my first problem in putting them in a record structure is, how do I know bit by bit to build this record from module to module, and when to start a new one, and how? for some reason...