Solved

Updating a Field Automatically with a Field in another Record

Posted on 2004-03-23
7
313 Views
Last Modified: 2010-04-27
Here is the problem, i am fairly new to filemaker, i have to create a database with a special level system, just say i have a field "sponser", and a field "level" just say the record that need to be updating has a level of "3" the way that it works is, the sponser is the name of the business that is 1 level below the current record, so i need to get from another record with the level of "2" the "Name" and have it update to "Sponsor" on the record with level "3", i think i explained it alright.
0
Comment
Question by:MA9N3TO
  • 4
  • 3
7 Comments
 

Author Comment

by:MA9N3TO
ID: 10664755
This is an example of what i mean:

Record 1

Name = Business1
Sponsor = N/A
Level = 2

Record 2

Name = Business2
Sponsor = (Needs to Be) "Business1"
Level = 3

Need to somehow make Record 2 "Sponsor" find the record that has level "2" and get the Name "Business1" and put it in Sponsor of Record 2
0
 
LVL 5

Expert Comment

by:mrpez1
ID: 10673322
I assume that each business has only one level and one sponsor that will always remain static. Can more than one business be at level 2 for instance? Can a business be promoted?

If the level field will be unique and static, you need to make a self join relationship b/w the new record and level number. You'll need a field in each record to tell the self join which level to associate with. I.e. a stored calc that shows (Level - 1) that is related to level in the same database. Have the sponsor field be a lookup (assuming the sponsor can't change) based on the SJ relationship.
0
 

Author Comment

by:MA9N3TO
ID: 10673581
thanks,

more than one business can be on a certain level, however they do remain on that same level,
and the sponsor for each business doesnt change

can you explain more clearly what you mean by self join
0
ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

 
LVL 5

Expert Comment

by:mrpez1
ID: 10673851
A self join relationship is when you creat a realtionship b/w a database and itslef. You relate a record to another record (or set of records) in the same database. What I posted won't work in this situation though b/c it will only find the first person of a level one less than the new record's level. You need some way to tell the new record which previous record is the sponsor.

e.g.:

Record 1

Name = Business1
Sponsor = N/A
Level = 1

Record 2

Name = Business2
Sponsor = Business1
Level = 2

Record 3

Name = Business3
Sponsor = Business1
Level = 2

Record 3

Name = Business4
Sponsor = ?
Level = 3

How will record 4 know whether Business2 or Business3 is the sponsor? You'll need to enter it manually. If there was only one level 2 business than you could do what I posted earlier.

Hope that helps.
0
 

Author Comment

by:MA9N3TO
ID: 10673922
thanks,

the way it will be set up is, just say business1 sponsors business 2 and 3, from the example you have shown, business3 would be the sponsor for business 4,

can u think of a way of doing this?

0
 
LVL 5

Accepted Solution

by:
mrpez1 earned 500 total points
ID: 10674566
You need a script to do this. You'll also need a global field in the database.

Here are the fields:

Company_name - text field
sponsor - Calculation (Case(IsEmpty(sponsor_number), "N/A", SJ_test::compnay name))
record_number -number (auto enter serial)
Level - number
_grecord_number -global number
sponsor_number - number

You'll need a self join relationship (to the same database):

sponsor_number =::record_number

 When the script is run from the sponsor company's record, it will do the following:

set field [ "global field', "record number"] This sets the global field to the sponsor's record number
New Record/request
set field ["sponsor number", "global field"] Now the sponsee's (?) record has the sponsor's record number
show custom dialog ["Enter company name", "company name"] This will set the name for the new company
Set field ["Level", "SJ_relation:level +1" This sets the sponsee's level to the sponsor's level + 1

0
 

Author Comment

by:MA9N3TO
ID: 10682935
thanks bro, that helped me out heaps
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
FileMaker Pro 10 webviewer cache error 3 98
Filemaker Output 6 216
Advertising design for my own Purpose 5 81
filemaker server 3 40
Pop up windows can be a useful feature of any Filemaker database.  Though best used sparingly, they can be employed in a multitude of different ways, for example;  as a splash screen at login, during scripted processes to control user input, as pick…
Conversion Steps for merging and consolidating separate Filemaker files The following is a step-by-step guide for the process of consolidating two or more FileMaker files (version 7 and later) into a single file with multiple tables. Sometimes th…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

778 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question