April 7, 200520 yr 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
April 7, 200520 yr If you just want tbl_orders::ID_turkey to be blank then use: Set Field [ tbl_orders::ID_turkey ; "" ]
April 8, 200520 yr Author 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
Create an account or sign in to comment