cp Posted October 3, 2001 Posted October 3, 2001 This is driving me crazy. I have button in a portal that is supposed to set fields in a related database. I use the relationship "open cases relationship" for the portal. The relationship matches "name" in this database with "namestatuscombo" in the related record. The button is supposed to change namestatuscombo and two other fields in the related database. "namestatuscombo", in the related record, starts out containing the person's name. My script reads Set Field ["open cases relationship::namestatuscombo",""closed""] Set Field ["open cases relationship::completed",""yes""] Set Field ["open cases relationship::date completed", "Today"] By changing namestatuscombo to "closed" the related record no longer matches the "open cases relationship" and so it no longer appears in the portal. It seems to work about half the time. The other half, only the field "completed" gets updated to "yes". This doesn't make any sense to me.
LiveOak Posted October 4, 2001 Posted October 4, 2001 First of all, you can't break the relationship and then expect to change fields in a now non-related record (duh!). If changing namestatuscombo breaks the relationship, why not move it to make it the last set field statement rather than the first? The fact that it works in an unpredictable manner is probably related to how and when the related record set is refreshed by FM. -bd
cp Posted October 4, 2001 Author Posted October 4, 2001 Oops, I typed the script steps backwards. Setting namestatuscombo comes last. Also I should have said that the script works completely the way it should about half the time (all fields get updated). In every case, "completed" gets changed to "yes", but a lot of the time this is the only field to get updated.
BobWeaver Posted October 4, 2001 Posted October 4, 2001 Try putting an "Exit Record/Request" step before the last Set Field step and see what happens. Like this: Set Field ["open cases relationship::completed",""yes""] Set Field ["open cases relationship::date completed", "Today"] Exit Record/Request Set Field ["open cases relationship::namestatuscombo",""closed""]
Recommended Posts
This topic is 8455 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