August 4, 200322 yr Hi all, Assuming we have an unstored calculation in a related file, based upon a global in the Main file. Assuming we want to display these matches in a portal in the Main File. I've seen a lot of question about this, and ran myself in this kind of experiences. The best I could get at the moment, thanks to this Forum, is to : 1. use another unstored calculation of type c_ReturnId = Case(field = ::Main:global, Record_Id, "") 2. place it in a empty layout with only that field 3. perform a Copy All Records 4. paste the result in a global field in the Main file 5. Use a new relationship Main:Global::Related:Record_Id I was wondering if someone had tried another method. Here's the idea. 1. Use a constant relationship 2. Create another unstored boolean calc of type : c_ReturnId = Case(field = ::Main:global, 1, 0) 3. Use that calc as the sort key of the Constant Calculation. Now, all those matching records would come first and we can determine that records > Sum(Constant::c_ReturnId) should be omitted from the list or find c_UnstoredStatusCurrentRecordNumber<Sum(Constant::c_ReturnId) But HOW can we script a Omit all record starting from X without having to enter the record in the dialog box??? Does anyone have another method ? I like the Copy all records, but I'm quite sure there's another solution. Thanks.
August 4, 200322 yr Copy all records is really much faster then looping. But in deed not really 'neat'...
August 4, 200322 yr Author Hi, Yes, Copy All is really much faster.... not "Neat" is why I would like to switch to another method. Another I've tried is to store each StatusRecordNumber in another loop script, then perform a GTRR based on a Range relationship. Too bad we cannot store a global and perform a script Omit Starting by "this global field". Now, the Copy All or the Loop+SetField also allow to "dynamically "show values in a portal.
August 4, 200322 yr Ugo DI LUCA said: Too bad we cannot store a global and perform a script Omit Starting by "this global field". Why not put a Goto Record [YourGlobal] scriptstep before the 'Omit' step?
August 4, 200322 yr Author Well, What I meant was... As we can determine through the sorted relationship and the Sum(Related::sortkey) which is the last "record" matching the "global criteria", we could easily store it as g_RecordNumber, and have another g_store = Sum(Constant::Record_ID)-Sum(Related::sortkey). and then use a script : Go to record (g_RecordNumber) Omit Multiple (g_store - no dialog) *** That's the missing point here, as the dialog doesn't offer (in FM5.5) a way to store a global. This would offer, at least in my case a really dynamic way to Go To Related Unstored Records....
August 4, 200322 yr If I understand correctly, then you want to omit all records after g_RecordNumber. Why not just do Omit Multiple [1000000000]?
August 4, 200322 yr Author I tried it Really, I think this feature is missing. Curiously, when you set it 1,000000 records, with a dialog, you've got an alert. With no dialog, it starts counting back to the first and omit them also, from the tests I've made. Hope I didn't conclude too fast my tests. If not, you may have solve a BIG problem and opened a wide breach in the FMI world.
August 5, 200322 yr Hey Ugo, Without dialog the 'omit multiple' scriptstep does not complain if there are not 'enough' records to omit. Does that make you a happier man? Good! Have a fine day, Ernst.
August 5, 200322 yr Author Uuhh?? I'll have to check this back when I come back. I don't have FM here... Thanks in advance
August 5, 200322 yr Ugo DI LUCA said: I don't have FM here... Poor Ugo... But I checked it and it works. Are you on holiday? If so have a nice time. The weather should not be a problem... Best regards, Ernst.
Create an account or sign in to comment