Anh_Tran Posted April 4, 2003 Posted April 4, 2003 Dear All, I Have a portal with date and ID Date ID 2003-01-01 1 2003-02-01 2 2003-03-01 3 But the condition is if Date > 2003-02-01 then the portal shows up only 2003-03-01 3 else does not shows any thing and calculation for Sum based on what portal shows up? Is there a way to do it? Thanks Anh Phu
Lee Smith Posted April 4, 2003 Posted April 4, 2003 Do Not Double Post. This appears to be the proper place for your question - not the Script Forum.
Ugo DI LUCA Posted April 4, 2003 Posted April 4, 2003 Hi Ahn-Tranh, It depends on how you set your "conditions" (global field for filtered portal, from a field in the Main,...?) Anyway, your total will still display the total of related
Anh_Tran Posted April 7, 2003 Author Posted April 7, 2003 Yeah DiLuca, from a field in the Main ...I just want that condition is used then shop up the portal... otherwise portal does not show that related record in the portal Do you have any idea? Thanks
Ugo DI LUCA Posted April 7, 2003 Posted April 7, 2003 Hi, Here is one solution, but you will have to use a little script. In your related file, start by creating a Modifier calc if you don't already have one. n_serial num d_modification date c_mod_Indexing = (d_modification date * 0) + n_serial num and a new relationship "ModIndexing Relationship", selfjoin in the related file using the c_mod_Indexing at left side and the n_serial num at right side. In your main, create 2 global fields : - g_date search (date) - g_constant (number = 1) Back to the related file, set a new calc : c_check_Superior_Dates = Case(d_date> Main::g_dateSearch, 1 ,0) and (as this calc cannot be indexed) a n_check_Superior_Dates (lookup from c_check_Superior_Dates using ModIndexing Relationship. Create a new relationship in the Main called checkSuperiorRel withe g_constant at left side and n_check_Superior_Dates at right. Draw a portal using this relationship. This portal will only show you those records superior to the date entered in the g_dateSearch field, when you will have indexed the related calc. Then use a single script "Update" attached to a button next to your global field. The script will go : Freeze window External script (related) Enter find mode SetField (c_check_Superior_Dates, 1) Perform find Goto Layout X (where c_mod_Indexing is) Go to c_mod_Indexing (select) Relookup Go to layout Y (in the main, where your portal is) Of course, all this operation will work for " > " find. You'll have to use another calc and relationship for other search " < " , "range of dates", ...but the process would be the same.
Recommended Posts
This topic is 7902 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