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

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

Recommended Posts

Posted

I have what appears to be a simple problem, but don't know how to address the solution.

 

To keep it somewhat simple. I have two [2] tables.

   1. A primary table that contains a layout that contains a container field. I use this container field to hold an image of a client logo.

   2. A logo table that contains the client logo, the client URL and and expiration date for the client.

 

   [in actuality, there are multiple container fields and multiple client logos]

 

When I open the primary table, my opening script determines whether the client logo should be displayed or not [based on the expiration date]. Depending on the date, I either display the client logo or a default logo indicating this space is not in use.

 

My question is . . can I perform the equivalent of the "Button Setup" action within my opening script to control what URL is to be used in the container field [either the client or the default]?

 

I know I can solve the issue by creating a 'trigger' script for each of the intended container fields, but would rather have a more elegant solution that is handled during the table opening operation.

Posted

I'm afraid this does not make a lot of sense, especially this sentence:

 

 

 

My question is . . can I perform the equivalent of the "Button Setup" action within my opening script to control what URL is to be used in the container field [either the client or the default]?

 

 

What does " URL to be used in the container field" mean?  Is the container field set up as button to do some action?  If so, what action?

Posted

Sorry bout the confusion.

 

In essence when I start my application, my startup script checks the 'logo' table I mentioned earlier to see if the client is past their expiration date.

 

If not, I want to load the container field in my primary table with the client logo from the 'logo' table and then establish a clien URL link to that container field so that the user can 'click' on the logo and be shuttled off to the appropriate web site.

 

If they are expired, I want to load the container field in my primary table with my 'default' logo and establish a URL link to a my site.

 

I've been able to easily get the logo populated, but am having problems figuring out how to establish the URL link without manually going to the layout and performing a 'button setup' operation. I'm hoping to automate this process so the system will automatically disable the client logo/url.

 

Hope this explains it a bit better.

Posted

You need to explain more about your tables and about the relationship between them.

 

It seems like one of your tables is a a table of Clients, where each client has a unique record containing (among other things) a logo and an expiration date.

 

I didn't understand what the other ("primary") table is or does. You say it "contains a container field. I use this container field to hold an image of a client logo." But which client (assuming there can be multiple clients in the Clients table)?

Posted

Thanks for getting back to me . . as usual, I 'assumed' that my relationships were intuitively obvious . . . sorry bout that.

 

I have a very simple relationship between the client table and the primary table. I have a unique global field in the primary table for each of the client records [a maximum of 7] and a 1-to-1 relationship between the two tables.

 

My primary table displays a lot of automotive information for the user to review and uses the client table only to populate my primary container field with a logo and attach a URL to the field. I want to provide the user a method to go directly to a client web-site in an easy way to let them 'dig deeper' into the information they're reviewing. For instance, if they're reviewing information about a specific "Chevy Impala" they may want to go to a place like Ecklers [a chevy supply house] and see if they have parts available.

 

Does this explanation help?

Posted

Far from being "intuitively obvious", this part makes no sense to me:

 

I have a unique global field in the primary table for each of the client records [a maximum of 7] and a 1-to-1 relationship between the two tables.

 

I am not suite sure what you're doing here, and I strongly suspect there is a better way to do it.

 

 

What is your "primary table" a table of? What does each record in it represent in real life?

 

 

if they're reviewing information about a specific "Chevy Impala" they may want to go to a place like Ecklers [a chevy supply house] and see if they have parts available.

 

Now that makes sense. But for this you would have (at least) a table of CarModels, a table of Manufacturers and table of PartSuppliers. Probably one more, since it stands to reason that a part supplier may supply parts for more than one manufacturer, so that eventually:

 

CarModels >- Manufacturers -< MfgSuppliers >- PartSuppliers

 

In this arrangement you could place a portal to PartSuppliers on a layout of CarModels, and see a list of all part suppliers that stock parts for the currently viewed car model's manufacturer. But what does this have to do with clients, logos and expiry dates?

Posted

I have tables of Years, Manufacturers, Makes, Models, Styles . . collectively over 300,000 records. All of my relationships between these tables is working correctly.

 

All I'm trying to do now is simply put a field on my Layout that In can manage through my 'client' table. That client table gives me the ability to manage my logos and URLs through software control rather than by manually changing these logos and/or URL's manually each time they need to change. I want my solution to be 'data driven' as much as possible.

 

Please help me here . . if I use a portal to link, for example, a manufacturer to a supplier, I only want the portal to display the 'logo' field in the related table. How do I get that portal field [namely the logo] to be treated as a 'button' and go to the respective web-site? I do like your suggestion, but up until now I've only been able to assign a URL to a field through a script and the 'Open URL' command. Are you suggesting that I write a script for the portal field and execute the 'Open URL' command that way?  Interesting . . .never thought of that approach.

 

Thanks for helping me

Posted

If you have a portal to the Clients table, and a Logo (container) field in the Clients table, you can simply place that field (Clients::Logo) inside the portal, make it a button and set it to:

Open URL [Clients::URL]

No global fields are required for this (certainly not 7 of them!) and this will work with any number of clients, whether 7 or 70 (as long as your portal can show them).

 

 

Now, if your clients have an expiry date, and you want the logo and the URL to change as the result of the date expiring, then let's add two global fields, gLogo and gURL, to the Clients table (though being global, they could be in any table) and also a calculation field (result is Container) =

Case ( Get (CurrentDate) > ExpiryDate ; gLogo ; Logo )

Place this calculation field in the portal instead of the Logo field, and set the button action to:

Open URL [Case ( Get (CurrentDate) > Clients::ExpiryDate ; Clients::gURL ; Clients::URL )]

This topic is 3889 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.