Rimbuk Posted February 26, 2001 Posted February 26, 2001 How do you modify multiple records at once through the web? Do you have to use a script? Lets say I want to change the value of one field for every record in the found list... how? (Basically, I want to mimic the 'replace...' menu option that can be found in FMPro.
Vaughan Posted February 27, 2001 Posted February 27, 2001 The only way is to call a script that peforms a replace. Be aware, however, that there are pittfalls associated with running scripts over the web... not the least is the consideration of multiple users and locked records which can stall scripts. [This message has been edited by Vaughan (edited March 04, 2001).]
abkaplan Posted March 17, 2001 Posted March 17, 2001 I use that solution it works try it: put on the list your field as an input text box. and put your record line on html code in an edit form. so you will see an edit button at the end of your list. fill in your inputs or edit them on the web and push on that edit button. that edit button will collect all the data in the input fields of all records seen on the web list and put them in to the input field of the first record according to the sort order. now you have to prepare a script ( script name =seperate) in file maker. that script will refind yor list according to your search criteria on the web list and sort them as the web list ( that is too important) and go to the first record copy the data written from the web and paste it in to a global dummy text field. and loop set the field = middleword(dummy;status-currentrecordnumber;1) go to the next record ( exit after last) end loop. and run that script from the web edit form <input type="hidden" name="-script" vale="seperate"> I use that process and it works. Bu dont forget those : 1. editable field in every rocord must contain an initial data an never let user leave it blank 2.don't let your users sort the list ( sort it yourself never let them change the order) 3.don't forget to sort the records in file maker in the same order as in the web list. [This message has been edited by abkaplan (edited March 17, 2001).]
Anatoli Posted March 17, 2001 Posted March 17, 2001 That will not work, if another user will start running the same script. You CANNOT rely on scripts on web!
Keith M. Davie Posted March 18, 2001 Posted March 18, 2001 Web Companion is single threaded. That means it can handle one request at a time. The web is a multi-user environment. abkaplan, test the collision. Make a simultaneous call on your script. You are in for a surprise. And not a pleasant surprise, I must say. Peace Keith M. Davie
abkaplan Posted March 27, 2001 Posted March 27, 2001 yes you may right. But during 2 mounths I have let about 200 users ( teachers to edit the finel exams.) use that script on the web. up to now on no one has reported about mis-inputs. But again you may right. One critical point using the same record at the same time by 2 users !... That is impossible. Because a record belongs to "only" one teacher. No one else can edit , more can see that record, no one can handle it. Users can see, edit only their records. Form that point no collision of using the records. I will start the same script at the same time form two diffrent pcs. Are you sure that a script can not be used by two users at the same time from the web ? Abkaplan
Anatoli Posted March 27, 2001 Posted March 27, 2001 Simon, I was the first person to post this scripts limitation here. And I am still using 1 script in 30 databases and so far it is OK. The script runs in 0.01 sec and it is doing nothing special, just marking Global field "Today" with Flag. So no search, not replace more records, nothing.
Simon Posted March 28, 2001 Posted March 28, 2001 Scripts are an absolute no no on the web I used one very simple script on my site. All it did was when someone logged in and found their record it would up the number in the access box by 1. A script that ran in under 0.5 secs. This was absolutely disasterous. The script constantly locked up the machine to the point that if any one did a search for their record they just got the first record in filemaker that the script had locked on. So every one was getting one poor guys resume record instead of their own. This stopped the second I stopped using the script. Else where I have seen on this forum that people say if a script runs in under a second then it is probably OK. This is crap. Web companion can send the next request that is queuing all most instantaneous to filemaker. Therefore the script would have to be near instant for it not to get messed up by the next person calling on it. Please, please please do not use scripts. Simon
Vaughan Posted March 29, 2001 Posted March 29, 2001 Anatoli -- why do have to use a script to do that? Surely it could be done with an -Edit just as easily!
Simon Posted March 29, 2001 Posted March 29, 2001 In the last week the average people on my website at any one time is 7 people, these people are all queueing queries to filemaker. The site has to take a hit of about 2000 people a day and 300 companies. Any script no matter how fast it runs would stall the machine. The next query is sent instantly to filemaker therefore even o.o1 secs is not fast enough in my book. The consequences of the database stalling and giving wrong information to people is too great. Simon
Anatoli Posted March 29, 2001 Posted March 29, 2001 quote: Originally posted by Vaughan: Anatoli -- why do have to use a script to do that? Surely it could be done with an -Edit just as easily! That is leftover from version 4. I will replace that with Inline. I cannot use -Edit, because I am using -Find on that spot.
Anatoli Posted March 29, 2001 Posted March 29, 2001 quote: Originally posted by sp: The consequences of the database stalling and giving wrong information to people is too great. Simon Simon, glad you are able to handle that kind of traffic. In my case nothing can go wrong, only Today will be without small red triangle. Anyway, I will redo that with Inline.
Keith M. Davie Posted April 6, 2001 Posted April 6, 2001 Rimbuk, be aware that you can safely run scripts on the web. Please see my posting "SIMPLIFY -scritps safely run..." on the cdml forum.
Recommended Posts
This topic is 8624 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now