![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Verify that both IDs are of type number. Create a new billing record manually then manually enter a Client ID that doesn't work to see what happens. If there is no matching record for the Client ID, your calc will always be blank because the checkbox in the bottom left corner "Do not evaluate if all referenced fields are empty" is checked. Just a suggestion If(isempty(Name), "", Name & " ") can more easily be written as Name & If(isempty(Name), "", " ") Good luck |
#4
| |||
| |||
|
|
Hi I have a frustrating problem. I've worked all afternoon to try and figure out the issue but to no avail. I have a contacts database which is related to a billing db. Upon clicking a "new bill to this contact" button in the contacts db, a script copies my contact's id, switches to the billing db and launches a script in the billing db that simply creates a new record, pastes the contact id into the contact id field and commits the record. So far so good. The billing db has a "client" text field that auto-enters all the pertinent client data (name, company address, etc) through a calculation based on the client id. The problem is that for some client records the whole things works flawlessly while for others I get nothing. I've simplified the field from being a complex calculation (at first) to a simpler one (second try), to a text field with a simple auto-enter calculation (third try...) yet still to no avail. Complex client entries (lots of info: addresses, emails, phone numbers) seem to work fine while others with equal or less data don't. I thought the: If (IsEmpty (compagnies::téléphone_compagnie);"" ; "Téléphone: " & compagnies::téléphone_compagnie & "¶")& construct would take care of any fields without data. You can see the whole calculation screen at http://www.heliomedia.com/calculation.gif [And you can tell what kind of mood I have been in at the end of the calculation! ]Thanks for any help or suggestions. Eric -- Eric Girouard --- http://www.heliomedia.com Canada 35mm at a time eric_at_heliomedia_dot_com |
#5
| |||
| |||
|
|
Verify that both IDs are of type number. Create a new billing record manually then manually enter a Client ID that doesn't work to see what happens. If there is no matching record for the Client ID, your calc will always be blank because the checkbox in the bottom left corner "Do not evaluate if all referenced fields are empty" is checked. |
|
Just a suggestion If(isempty(Name), "", Name & " ") can more easily be written as Name & If(isempty(Name), "", " ") |
)
#6
| |||
| |||
|
#7
| |||
| |||
|
|
Any hunches? Eric |
#8
| |||
| |||
|
|
OK. If we are talking hunches here goes, My hunch is that you have a broken relationship, incorrect context or duplicated ID numbers. I think you have covered all the obvious problems so these are all somewhat unlikely. If the lookup produces nothing then logic says there is no related record or the first related record has empty fields. No related record leads to "kill me now" so if you are getting that result then in that case there is no related record. On the other hand if you do not get the "kill me now" then you have a related record with empty fields. Maybe there is a duplication of ID numbers with the first related record simply having an ID and later records having the data. From your calculation it seems hat you are using v7 so there is also the possibility of incorrect table occurrence context. Another hunch also does the relationship have conditions other than equality of ID numbers? Eric Girouard wrote: Any hunches? Eric |
![]() |
| Thread Tools | |
| Display Modes | |
| |