lunamuna Posted June 18, 2002 Posted June 18, 2002 I'm trying to allow end-users to delete records, but only through a button which can check various details and make sure that it actually *should* be deleted. The problem is that I have to make their available commands "Normal", so I can't just give them permission to delete and only let them use it when I give them a button. Currently, they just don't have permission to delete. I thought that if I set up a script to delete, it would override that lack of permission, but it doesn't seem to. Any suggestions?
Allegheny Posted June 18, 2002 Posted June 18, 2002 This script is really driving me nuts. I left out the loop portion of the script and was able to make it work. But what's going wrong when I add the loop? [Here's what I want to happen: I have a mailing list that may contain some duplicate records. I don't want to delete the records because they each represent a different purchase by the company. I also don't want to send 6 different catalogs to the same company. In addition, I don't want to have to omit the duplicates by hand.] Here's my bloody script: Sort (restore sort order: State, City, Company (all in ascending order)) Loop Go to Record/Request/Page FIRST Set Field (Global Company, Company) Set Field (Global City, City) Set Field (Global State, State) Go to Record/Request/Page NEXT, Exit After Last If (Company = Global Company and City = Global City and State = Global State) Omit Else If (Company /= Global Company and City /= Global City and State /= Global State) Go to Record/Request/Page NEXT, Exit After Last End if End if End Loop What am I not seeing?
SteveB Posted June 18, 2002 Posted June 18, 2002 Move the goto record(first) and the 3 setfields above the start of the loop following the sort
harryk Posted June 18, 2002 Posted June 18, 2002 What you are not seeing is: that the go to record(first) step should be BEFORE the loop, not in the loop...furtheron, some script steps seem to me superfluous. Isn't just this enough? Sort (restore sort order: State, City, Company (all in ascending order)) Go to Record/Request/Page FIRST Loop Set Field (Global Company, Company) Set Field (Global City, City) Set Field (Global State, State) Go to Record/Request/Page NEXT, Exit After Last If (Company = Global Company and City = Global City and State = Global State) Omit Endif End Loop
Allegheny Posted June 19, 2002 Posted June 19, 2002 Thanks mucho! It works fine now. And I can see why I didn't need the "Else" and second "If"
djgogi Posted June 19, 2002 Posted June 19, 2002 User can do (manually or via scripts) only what his/her Access Privileges allow him. So if the password he/she logged does not permit deletions of records there's no way to delete them. Dj
Recommended Posts
This topic is 8197 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