dbTalk Databases Forums  

Why, when one looks like the other, they're not the same...

comp.databases.filemaker comp.databases.filemaker


Discuss Why, when one looks like the other, they're not the same... in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Carpeflora
 
Posts: n/a

Default Why, when one looks like the other, they're not the same... - 02-27-2007 , 09:03 AM






I have two scripts creating new records from a portal in related
tables. (OSX, 8.5)

The first I'll name "Working" and the other I'll name "Dopie"

Working creates a new record for each if/endif where tested true,
Dopie will run each test accurately, but does not perform a find for
each true test like Working does.

Dopie creates one new record, with accurate data (including pulling
result from second if for "customers" if "vsi" doesn't produce a
"yes")...so the if/test/result must be functioning. I cannot figure
why "working" creates a record for each if/endif....and Dopie is not.
Driving me nuts.... Any ideas welcome!

*******************

"Working"
Set Variable [ $$ppart; Value:Product Parts::Product Part ID ]
New Window [ Name: "Product Part Approvals"; Height: 400; Width: Get
( WindowDesktopWidth ); Top: 600 ]
If [ Product Parts::LicensorAppReqD = "YES" ]
Go to Layout [ "ppapplist" (ProductPartApprovalList) ]
New Record/Request
Set Field [ ProductPartApprovalList:part4app; $$ppart ]
Set Field [ ProductPartApprovalList::AppLevel; "Final Design" ]
Set Field [ ProductPartApprovalList::Approver; "Licensor" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If
If [ Product Parts::ClientAppReqD = "YES" ]
Go to Layout [ "ppapplist" (ProductPartApprovalList) ]
New Record/Request
Set Field [ ProductPartApprovalList:part4app; $$ppart ]
Set Field [ ProductPartApprovalList::AppLevel; "Final Design" ]
Set Field [ ProductPartApprovalList::Approver; "Customer" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If
If [ Product Parts::VSIAppReqD = "YES" ]
Go to Layout [ "ppapplist" (ProductPartApprovalList) ]
New Record/Request
Set Field [ ProductPartApprovalList:part4app; $$ppart ]
Set Field [ ProductPartApprovalList::AppLevel; "Final Design" ]
Set Field [ ProductPartApprovalList::Approver; "VSIntl" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If
If [ Product Parts::LicensorAppReqP = "YES" ]
Go to Layout [ "ppapplist" (ProductPartApprovalList) ]
New Record/Request
Set Field [ ProductPartApprovalList:part4app; $$ppart ]
Set Field [ ProductPartApprovalList::AppLevel; "Final Proof" ]
Set Field [ ProductPartApprovalList::Approver; "Licensor" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If

**************************

"Dopie"
Set Variable [ $$ppartr; Value:Product Parts::Product Part ID ]
If [ Product Parts::VSIAppReqProd = "yes" or Product Parts::VSIAppReqP
= "yes" or Product Parts::VSIAppReqD = "yes" ]
Go to Layout [ "ProductPartsReported" (ProductPartsReported) ]
New Record/Request
Set Field [ ProductPartsReported::PartID#; $$ppartr ]
Set Field [ ProductPartsReported::Approver; "VSIntl" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If
If [ Product Parts::ClientAppReqProd = "yes" or Product
Parts::ClientAppReqP = "yes" or Product Parts::ClientAppReqD = "yes" ]
Go to Layout [ "ProductPartsReported" (ProductPartsReported) ]
New Record/Request
Set Field [ ProductPartsReported::PartID#; $$ppartr ]
Set Field [ ProductPartsReported::Approver; "Customer" ]
Commit Records/Requests
[ Skip data entry validation; No dialog ]
End If


Reply With Quote
  #2  
Old   
Carpeflora
 
Posts: n/a

Default Re: Why, when one looks like the other, they're not the same... - 02-27-2007 , 09:06 AM






Quote:
Working creates a new record for each if/endif where tested true,
Dopie will run each test accurately, but does not perform a find for
each true test like Working does.
but does not perform each true test like "working" does. (no finds
involved here)

also...both scripts run off the same portal record....



Reply With Quote
  #3  
Old   
Carpeflora
 
Posts: n/a

Default Re: Why, when one looks like the other, they're not the same... - 02-27-2007 , 09:15 AM




Got it... I was missing a relationship... !


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.