Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7699 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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

Posted

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!

Posted

would a "transparent button" over the Entire Body (when clicked outside of portal-run the script) be an "OK solution"?

Posted

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.

Posted

If you can make anything work for you, then I would say it's definitely "OK". wink.gif

This topic is 7699 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.