Unique index and BrokenRules


Author
Message
Jiri Brazda
Jiri Brazda
StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Great info! I'm looking forward to next versions Smile

Thanks

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
This is something that is actually on the list for a future update.  We added this to our BaseBO in our medical software and we will most likely incorporate this into the framework once it has been throughly tested.
Jiri Brazda
Jiri Brazda
StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Yes I'm using similar approach. I just wanted to ask whether SF can handle Unique key rules somehow automatically - just like it does with required fields - to avoid wasting time when some solution already exists...

Thank You for reply Smile

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.4K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I've done a couple of things to handle unique index issues, the best being to handle it in the CheckRulesOnCurrentRow event handler of the BO.



In the event handler, I call another method to check if the data would violate the unique index, usually a sproc. If the data would violate the unique index, I then setup broken rules for the fields the user can change to fix the issue.



Hope that helps! BigGrin
Jiri Brazda
Jiri Brazda
StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)StrataFrame User (146 reputation)
Group: StrataFrame Users
Posts: 78, Visits: 356
Hi,

I have Unique index on some fields in tables and now I would need to inform user that he has entered duplicated value. At the moment I'm solving this problem bz calling my methods such "...IsUnique" and manually adding information about duplicity to BrokenRules collection to be handled later.

The question is simple - is it possible to force BrokenRules to handle Unique indexes?

Thank You

Jiri Brazda

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search