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

Entering common data to use across unrelated files


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

Recommended Posts

Posted

Hi everyone,

This is my first post! - can anyone help me?

I am writing a Quality Control and policy management solution to be used as a runtime. It has 14 databases related in varying ways, but with NO COMMON RELATIONSHIP.

I want to enable users to enter data such as User name and Company ONCE ONLY on their first boot of the primary file, and to have this data appear in the headers or footers of the various printable reports across all 14 files within the solution. Is there any way of doing this?

Look forward to hearing from you if you can help me.

CJ. confused.gif

Posted

Usually solved with constant (for ex, 1-1 relationship)

SImply define in each file field "const0ne" as auto enter number 1 (or calculated 1), than relate files using this fields.

Dj

Posted

Thanks DJ,

I couldn't get it to work exactly as you suggest but have now cracked it in the following way: Hope this is useful to others.

e.g. to allow a user to enter his company name once into the primary file of a solution, and have it available in every record and layout in all the other files of the solution.

1. In the Primary File (the one that will have the data entered into it) create a new NUMBER field and name it "ConstOne". Go to options and select Auto Entry. Select Data and enter the number 1. Select prevent modification of value.

2. In each of the other files create a new GLOBAL field and name it "ConstOne".

drag this onto any layout and enter the number 1. Then remove the field from the layout

(but leaving it as a defined field in the define fields box).

3. In each of the other files create a new relationship with the primary file in which your source data will be entered, using "ConstOne" as the match field - rename this relationship "ConstOne".

3. In each of the files (except the primary file) create a new CALCULATION Field to contain the data in the primary file that you will want to be distributed to all the other files. Name this (e.g. Company Name) In the calculation creation box select "GetField" and double click . select (field) choose "ConstOne" as the file from the drop down file choice box, and (e.g.) ":: Company name" as the field (note the doable colons). Inside the brackets, put quote marks at beginning and end of the field as so:

GetField("ConstOne::Software Name_Version")

You should now be able to place your new field anywhere in any file and return the data entered into your primary file !

CJ. smile.gif

Posted

Re: 2. Instead of globals, most developers tend to use a calc field that is equal to simply the number 1. Some prefer auto-enter as in your step 1, however there is very little overhead in using a calc, and it has the huge advantage that it always works, even if you save a clone, or import data.

Re: 3b. There's no need for the GetField calc -- just put the related field directly on your layouts.

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