dbTalk Databases Forums  

trouble with script updating portal row

comp.databases.filemaker comp.databases.filemaker


Discuss trouble with script updating portal row in the comp.databases.filemaker forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joseph O'Brien
 
Posts: n/a

Default trouble with script updating portal row - 09-27-2005 , 09:10 AM






I'm trying to write a script that will simply create and populate a new
portal row. When I run it, though, it fills all the fields in the new
row with "0" rather than the intended text.

===SCRIPT START===
Go to Portal Row [ Last, Select entire contents ]
Set Field [ worklog::Employee, worklog::Employee="Joe" ]
Set Field [ worklog::Work Description, worklog::Work
Description="Administrative" ]
Set Field [ worklog::Hours, worklog::Hours=.25 ]
===SCRIPT END===

Context: Worklog is used to track employee time. Employees enter their
time into Worklog through a portal.

FMP 6, Windows XP
FM Server 5.5

If anyone can offer any solutions, I would appreciate it.

Thanks,
Joseph


Reply With Quote
  #2  
Old   
F.Balaguer
 
Posts: n/a

Default Re: trouble with script updating portal row - 09-27-2005 , 10:37 AM






The second argument of Set Field is the actual value you are trying to
set. What you have as second argument is the equality comparison*
Your script should look like:
Go to Portal Row [ Last, Select entire contents ]
Set Field [ "worklog::Employee", "Joe" ]
Set Field [ "worklog::Work Description", "Administrative" ]
Set Field [ "worklog::Hours", "0.25" ] // assuming that you are setting
the Hours to be .25


Federico

* note that in some languages booleans are mapped to integers where
false->0 and true to any other value. Because worklog::Employee =/=
"Joe" the value set was the string "0" as a textual representation of
false


Reply With Quote
  #3  
Old   
Joseph O'Brien
 
Posts: n/a

Default Re: trouble with script updating portal row - 09-28-2005 , 08:36 PM



Federico,

Thank you! I have been working in a few different programming
languages, and I forgot how this worked in FMP.

Thanks again!
joseph


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.