Solved

Updating a Field Automatically with a Field in another Record

Posted on 2004-03-23
7
308 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
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Problem: You have a hosted FileMaker database and users are tired of having to use Open Remote or Open Recent to access the database. They say, "can't you just give us something to double-click on rather than have to go through those dialogs?" An…
Having just upgraded from Filemaker 11 to Filemaker 12 over the weekend, we thought we would add some tips for others making the same move.  In general, our installation went without incident. Please note that this is not a replacement for Chapter 5…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now