I do recall seeing some topics about storing arrays in global and doing conversions in order to get the array back out of the global.
Didn’t find those so just posting under a new topic.
In what I remember from the discussions there seemed to be lacking (or I just missed it) an easy way out of the issue so hence this question :
What is wrong with creating some custom values based valuelist(s) and use those as “global” accesible arrays? So I would build up an array and store the array with setvaluelist and retrieve them with getValueList .
I’m I correct that this way I can store 2 dimensional arrays ? (displayvalues and retrievevalues)
you can store anything you want in a global if you declare it as a media type.
Also you can store anything you want in the global.XXXX if you don’t specify it as a global in the dataprovider dialog (so globals that you only use in scripting don’t need to be declared)
But what do you really want to do with those arrays? Should they store a selection for you for a specific custom valuelist?
jcompagner:
you can store anything you want in a global if you declare it as a media type.
OK
jcompagner:
Also you can store anything you want in the global.XXXX if you don’t specify it as a global in the dataprovider dialog (so globals that you only use in scripting don’t need to be declared)
So the moment I use global.newglobal in a script this newglobal is put for the duration of the session on the global stack available from other scripts for manipulation ? How do you type it ? Can you cast them ?
jcompagner:
But what do you really want to do with those arrays? Should they store a selection for you for a specific custom valuelist?
Well my remark came more from the idea that valuelists are just globals declared in a different way AND especially fit to store arrays. Are they just globals ?
jcompagner:
you don’t have to type it. It will be threated like media, so no converstion is tried you exactly get what you put in.
This is completly new to me!
So you can do this:
controller.duplicateFoundset()
and put this in a column assigned as media? So you can store complete foundsets?
Can’t be done. The 200 limit will still apply. When you use loadRecords(pk_ids) - behind the scenes we’re executing a SQL query using the IN statement - which is why there is a 200 record limit.
One idea is you can store the FIND that you used to get that found set - and then re-perform the find.
Right. That is a bummer. I’m still confused as to why they would want to save a foundset with other 200 in it…
I know that I used that technique in FMP (store all the PKs and then go to them all) - but when I think about SQL applications - I realized that some of the “cool things” that I did in FMP (just because I could) don’t really make a lot of sense.
Bob…here’s one example: You want to allow the user to flag and store various lists of contacts (say, for slightly different repeatable mailings), where the flagging is based on personal experience with the contacts, not find criteria. You have 1,200 contacts and any list may include up to the total number.
JerryR:
Bob…here’s one example: You want to allow the user to flag and store various lists of contacts (say, for slightly different repeatable mailings), where the flagging is based on personal experience with the contacts, not find criteria. You have 1,200 contacts and any list may include up to the total number.
Jerry and Harjo - I can see your point. In that case I would add a keyword, or some identifier (either hidden or not hidden) to the record. Like:
mail01, mail02, mail03, etc.
Then you can FIND those contacts almost instantly. No need for crazy stored keys, etc. Plus, it’s VERY FAST to append a code like that to the current foundset.
bcusick:
Jerry and Harjo - I can see your point. In that case I would add a keyword, or some identifier (either hidden or not hidden) to the record. Like:
mail01, mail02, mail03, etc.
Then you can FIND those contacts almost instantly. No need for crazy stored keys, etc. Plus, it’s VERY FAST to append a code like that to the current foundset.
Just an idea.
not possbile if customers are in more than one mailinglist!
bcusick:
Jerry and Harjo - I can see your point. In that case I would add a keyword, or some identifier (either hidden or not hidden) to the record. Like:
mail01, mail02, mail03, etc.
Then you can FIND those contacts almost instantly. No need for crazy stored keys, etc. Plus, it’s VERY FAST to append a code like that to the current foundset.
Just an idea.
not possbile if customers are in more than one mailinglist!
So I have a customer. There is a field called “mailing_lists”. I have a foundset that I’ve arrived at (omitted records, etc). I run a method that uses foundsetUpdater to append “mail03” to the field “mailing_lists”.
I want to recall that list - so I do a find where field “mailing_lists” %mail03%