October 28, 200322 yr Hello people! a push in the right direction would be great! scenario: 3 fields [Contact_ID] [Company_ID] [LockRecord] I am trying to validate user input and "lock" it down based on the fact that there can only be one combination of Contact_ID and Company_ID I have tried to mark the record by: LockRecord= If( ((Contact_ID) and (Company_ID))>1,1,0) but no luck...basically I would like to allow 1 Contact per 1 Company. These records are entered through the portal so I need to stop the entry as the list might be large and scrolling through all the recors (to make sure that "Contact was not already assigned to the same Company") would be a pain.... Thank you very much!
October 28, 200322 yr Hi Leb, I would create a calculated concatenation of the two ID fields, a self-relationship to itself, and script the entry so that when a record is committed, a button is pushed that validates based on a script with If [Count(selfrel::serial) > 1] [color:"white"]__Show Message ["This combination of Company and Contact already exists. Please select another."] Else [color:"white"]__Perform Script ["whatever"] End If
October 29, 200322 yr Author one followup question: is there a way to assing a scrip "onSelect/onEntry" of a pop-menu instead of a "validating button" as u suggested? thank you!
October 29, 200322 yr Author would a "transparent button" over the Entire Body (when clicked outside of portal-run the script) be an "OK solution"?
October 29, 200322 yr If you loop, pausing for one second each time, and exit loop if the selection field isn't empty, then yes. But this can get tricky, depending on the OS. Someone could probably point you to a sample file that incorporates options for both Mac and Windows.
Create an account or sign in to comment