Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

Portal shows up depends on Condition


Anh_Tran

This topic is 7854 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7854 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.