MnR Posted April 7, 2005 Posted April 7, 2005 hi, Heres my problem, when the user presses the button to cancel an order placed i need to remove a assigned turkey to that customer. I have a script to set certain fields to correct values to remove from the relationship of the portal. The button for cancelling is in a portal with a relation to filter out cancelled orders and only show active. Now I need to make a script that sets the ID of the turkey in that table to nothing. I noticed that if i removed the unique value (because the id needs to be) the script works setting it to 0. But however if i apply it with unique set it only works once. I need a way to select the portals fields value and set to nothing no value. heres my script so far.. Set Error Capture[on] Allow user abort [on] if[tbl_orders::WeightNeeded > 0] Show diolog["etc warning user about cancelling etc etc"] if[Get(LastMessageChoice) = "1"] Set Field [tbl_orders::cancel?; "Yes"] Set Field [tbl_orders::cancelled; "1"] #something to remove the tbl_orders::ID_turkey etc End If Else Show diolog ["no order to cancel"] End If Any help would be great MnR
quillpro Posted April 7, 2005 Posted April 7, 2005 If you just want tbl_orders::ID_turkey to be blank then use: Set Field [ tbl_orders::ID_turkey ; "" ]
MnR Posted April 8, 2005 Author Posted April 8, 2005 ah i think i tried that but left it blank maybe if i add the "" then it should solve it, thanks i will try it and let you know. MnR
Recommended Posts
This topic is 7172 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