Ugo DI LUCA Posted August 4, 2003 Posted August 4, 2003 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.
Fitch Posted August 4, 2003 Posted August 4, 2003 Instead of Copy all, you can Loop, and Set field (global, global & "
ernst Posted August 4, 2003 Posted August 4, 2003 Copy all records is really much faster then looping. But in deed not really 'neat'...
Ugo DI LUCA Posted August 4, 2003 Author Posted August 4, 2003 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.
ernst Posted August 4, 2003 Posted August 4, 2003 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?
Ugo DI LUCA Posted August 4, 2003 Author Posted August 4, 2003 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....
ernst Posted August 4, 2003 Posted August 4, 2003 If I understand correctly, then you want to omit all records after g_RecordNumber. Why not just do Omit Multiple [1000000000]?
Ugo DI LUCA Posted August 4, 2003 Author Posted August 4, 2003 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.
ernst Posted August 5, 2003 Posted August 5, 2003 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.
Ugo DI LUCA Posted August 5, 2003 Author Posted August 5, 2003 Uuhh?? I'll have to check this back when I come back. I don't have FM here... Thanks in advance
ernst Posted August 5, 2003 Posted August 5, 2003 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.
Recommended Posts
This topic is 7873 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now