Validation Rule: Department cannot have more than 5 employees

Say there is a LOV of departments. User will select one department, and employees connected with that department will be displayed in the table below.
Then there will be a button to create an employee. Once entering the data, the user will press Save button. Now there is a validation where the application will check that a department cannot have more than 5 employees.
I want to know how to create, and where to create such a validation rule, and how?

Sorry to rain on the parade here, but I don't believe that any of these solutions will work correctly, at least not if your application has more than one user.
There is one way (short of using explicit locking, which is a bad idea for a web app) that I know of to implement such a requirement - it would involve creating a refresh-on-commit materialised view in the database and placing a check constraint on the MV. The MV would simply be something like "select department_no, count(*) num_employees from employees group by department_no" and the check constraint would ensure that num_employees must be less than or equal to 5.
John

Similar Messages

  • Cannot have more than one Mobile item for a person

    Hi,
    I cannot have more than one mobile phone item for a person. In India some of them carry dual SIM card phones and both will be valid. In Lumia 800, I dont see an option to add two mobile items. I can do with a work around by choosing one mobile item with Windows Live Account and another with Google Account. But then that is not the right way to do it. If I need it both on same account, then I cannot do it.
    This feature is available in all the Android phones. Also i am facing another issue is that Lumia 800 does not sync any mobile item #2 of Google account, so I have to go to Google and manually add that phone number to my phone, which is painful.
    Hope Microsoft is listening.
    But I really like the way the facebook, SMS and all other chat are sync'ed in one place.
    Regards,
    -Srinivasan.

    The wierd thing is they have duplicates for Home/Work but not for Cell. I have the odd contact that has two cell phones. Really only two work arounds, use one of the other available types as a secondary cell number or what I do is create two contacts, one in Exchange and one on Live. Since my main account is Exchange, I put the secondary number in the Live contact, then on the phone I link the two together. This way I see two cell numbers for one contact.

  • "value cannot have more than 0 decimal places" error

    CRM gurus,
    Whenever I try to create a Counter, I receive the following warning which doesn't allow me to do anything further..
    "<b>value cannot have more than 0 decimal places"</b>
    I first received this when I tried to assign a counter to a product in an Installed Base. So when I tried creating a counter here, I got the above message. I then tried to assign a counter to the product in the product master data, and I still received the same error message. I then tried creating a counter from the "Maintain Counter" screen (Transaction Code: <b>crm_mpk_admin</b>), and still received the same error message.
    In this effort I created my own custom Counter Category, and Attributes. Nothing helped.
    Could someone throw some light on this concept and tell me where am I going wrong.
    Thanks and regards,
    -Pras

    Hi
    I think its a program error, you need to Implement the source code corrections.
    Please refer <b>SAP Note : 855670</b>
    Regards,
    Johnny.
    Reward if it helps.

  • CMDGW_CAT:3441: ERROR: Cannot have more than 3 entries in RACCESSPOINT LIST

    Hi,
    i have tuxedo 8.1 in HP-UX.
    In the section of my dmconfig i have:
    SERVICEF LDOM=DOMLOCAL RDOM=WTC1,WTC2,WTC3,WTC4
    I have this error when i tried to compile with dmloadcf -y dmconfig:
    Invalid value
    CMDGW_CAT:3441: ERROR: Cannot have more than 3 entries in RACCESSPOINT LIST
    CMDGW_CAT:1546: ERROR: dmloadcf: Above errors found during syntax checking
    can I increase the value of the parameter RDOM over 3?
    How?
    thanks...

    Hi,
    The syntax:
    service LDOM=local_domain RDOM= dom1,dom2,dom3
    defines failover remote domains for that particular import. It's not meant to provide access to a service in multiple domains. What you want is basically what you did, i.e.,
    service LDOM=local_domain, RDOM=dom1,dom2
    service LDOM=local_domain, RDOM=dom2,dom3
    service LDOM=local_domain, RDOM=dom3,dom4
    service LDOM=local_domain, RDOM=dom4,dom1
    This would provide load balancing across the 4 domains, and still provide failover domains, although if the connection policies are set to ON_STARTUP, then the following is sufficient:
    service LDOM=local_domain, RDOM=dom1
    service LDOM=local_domain, RDOM=dom2
    service LDOM=local_domain, RDOM=dom3
    service LDOM=local_domain, RDOM=dom4
    As only the active domains will be used, and inactive ones will be skipped.
    Regards,
    Todd Little
    Oracle Tuxedo Chief Architect

  • Cannot have more than 4000 BitmapCacheBrush

    Hello,
    Sorry for my bad english.
    I cannot create more than 4000 BitmapCacheBrush. I think it's because there is a limit of 10000 GDI handle per process.
    There is no error, but the application block.
    The MSDN don't say anything about this limit (it should at least). Is there a workaround ?
    Am I wrong if I say that BitmapCacheBrush use RenderTargetBitmap ? Which is bugged (see my last post at https://social.msdn.microsoft.com/Forums/vstudio/en-US/e6713faa-2d0d-4f28-b6b7-4e5213253538/releasing-rendertargetbitmap?forum=wpf).
    Thank you for your help.

    Thank you for your interest.
    So, if BitmapCacheBrush do not use RenderTargetBitmap, I think both of them uses something that is bugged.
    An exemple, here you are :
    XAML :
    <Window x:Class="WpfApplication.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"        Title="MainWindow" Height="350" Width="525">
    <Grid>
    <Grid.RowDefinitions>
    <RowDefinition Height="auto"/>
    <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Button Grid.Row="0" Content="Click" Click="Click" />
    <Viewport3D Grid.Row="1" x:Name="myViewport">
    <Viewport3D.Camera>
    <PerspectiveCamera LookDirection="-100 -100 -100" Position="100 100 100" UpDirection="0 0 1" />
    </Viewport3D.Camera>
    </Viewport3D>
    </Grid>
    </Window>
    Code :
    private void Click(object sender, RoutedEventArgs e)
    ModelVisual3D model = new ModelVisual3D();
    Model3DGroup group = new Model3DGroup();
    PointCollection textTexturesCoordinate = new PointCollection(8) { new Point(0, 1), new Point(0, 0), new Point(1, 1), new Point(1, 0) };
    Point3DCollection textPositions = new Point3DCollection(4) { new Point3D(0, 0, 0), new Point3D(1, 0, 0), new Point3D(1, 1, 0), new Point3D(0, 1, 0) };
    Int32Collection textTriangleIndices = new Int32Collection(6) { 0, 3, 1, 0, 2, 3 };
    MeshGeometry3D mesh = new MeshGeometry3D() { Positions = textPositions, TextureCoordinates = textTexturesCoordinate, TriangleIndices = textTriangleIndices };
    for (int i = 0; i < 5000; i++)
    group.Children.Add(new GeometryModel3D() { Material = GetDiffuseMaterial(i.ToString()), Geometry = mesh });
    model.Content = group;
    myViewport.Children.Add(model);
    public DiffuseMaterial GetDiffuseMaterial(string text)
    FormattedText formattedText = new FormattedText(text, CultureInfo.InvariantCulture, FlowDirection.LeftToRight, new Typeface("Verdana"), 12.0, Brushes.Black);
    DrawingVisual drawingVisual = new DrawingVisual();
    using (DrawingContext drawingContext = drawingVisual.RenderOpen())
    drawingContext.DrawText(formattedText, new Point(0, 0));
    return new DiffuseMaterial(new BitmapCacheBrush(drawingVisual));
    When you push on the button "click", the application freeze.
    If you change 5000 in 1000, then when you push on the button "click", the application doesn't freeze.
    Edit : In my post, I said 4000, but it's approximative. The limit is between 4000 and 5000.

  • Since downloading the iOS on my iPad, I cannot download more than one pdf from mail to iBooks.  I have to shut down y iPad and start again.  Any suggestions?

    Since downloading iOS on my new iPad, I cannot downlaod more than one pdf from mail into iBooks.  I have to shut down my iPad and restart it to save a second pdf. Wasn't a problem with the old operating system.  Any suggestions?

    It seems that I have solved my issue by performing a full factory reset (erasing all content, something which I had hoped to avoid) restoring from an iCloud backup did not alleviate the issue, I had to set up as a new iPad.
    Hopefully anyone else else who has this issue in the future will be able to find this.

  • Cant sync iPod touch.  comes up with "cannot be synced because there is not enough free space to hold all of the items in the iTunes library (21.6MB required, 304.8MB available)."  I am so confused.  I have more than enough space even on PC.

    cant sync iPod touch.  comes up with "cannot be synced because there is not enough free space to hold all of the items in the iTunes library (21.6MB required, 304.8MB available)."  I am so confused.  I have more than enough space even on PC.

    That message is telling you that you do not have enough stgorage on the iPod to accomodate all the media you are trying to sync to the iPod.
    Sync less
    iTunes: Syncing media content to iOS devices and iPod       
    Try syncing using the manual method                
    Managing content manually on iPhone, iPad, and iPod

  • Anyone else have the issue where, after the 8,3 upgrade, you cannot access more than 1 exchange account on your iPhone? This is annoying to me as I need to access 4 daily and cannot due to this error.

    Anyone else have the issue where, after the 8,3 upgrade, you cannot access more than 1 exchange account on your iPhone? This is annoying to me as I need to access 4 daily and cannot due to this error.
    The first one, my private home email, works fine. With the other 3, I get the message "Cannot get mail: The connection to the server failed"
    All were working fine before the 8.3 upgrade. I did try the old trick of making one minor change on the account and resaving, but that did not change anything. I even deleted my work account and re-entered it from scratch, but again, sadly, no luck. For the time being, I am successfully getting the email via IMAP, but this ***** compared to exchange. Anyone have any idea what is happening or if a fix is in the works?

    Well, the one set up on exchange 2k3 is now working fine, although no changes were made on either the iPhone or the exchange side, so that's fun, but it still is throwing errors when connecting to the other 2 exchange accounts. The common elements are that both non-functioning exchange accounts are google apps for business accounts. So is one of the ones that's working, by the way. The settings on both accounts are the same as the one that's working, and both worked fine before the 8.3 upgrade. I have no issue accessing both of these accounts on my ipad which is currently on 8.2.x. If it's not the iphone OS at fault, I'm at a loss as to what it could be.

  • HT1222 Hey, I've tried to install the new iOS 7.1 but it says that the installation cannot be completed and doesn't say why. I have more than 50% battery left but it still doesn't work, help?

    Hey, I've tried to install the new iOS 7.1 but it says that the installation cannot be completed and doesn't say why. I have more than 50% battery left but it still doesn't work, help?

    It probably means you don't have enough available storage on your phone.  It takes space to store the download - THEN unpack it.  Best method is to use a computer with iTunes (This allows you to back up on your computer as well). 
    PLEASE:  Do not purchase iCloud storage space - this will not give you more room for the iOS 7.1 installation.

  • I cannot download software update, download & install key is grayed out. I have more than enough storage.

    I cannot download software update, download &amp; install key is grayed out. I have more than enough storage.

    Hi,
    Are you connected to a Wi-Fi network? If not this may be the reason why.
    Regards,
    Steve

  • After i downloaded Firefox 7, I cannot open more than one page at a time. I have done everything you suggested about ad-on, etc. Other people are having problems. Can I get reall help with this or should I just reload Firefox 4?

    Firefox 7 is a dud. Cannot open more than one tab at a time, will not open additional pages. Nothing you suggested has worked.
    Can I take down Firefox 7 and reload Firefox 4?
    I need to talk with a live person! I am real disappointed with this.

    Sorry there is no telephone support. You could try the IRC if you want a quick response, ( whilst it is [https://support.mozilla.com/en-US/kb/ask open] )
    Firefox 4 is not supported, but firefox 3.6 is
    * see [[installing a previous version of firefox]]
    There is a change to a preference which may help, post back with more details of your problems please.

  • Cannot dauthorize all computers in iTunes nor can i authorize as it states I have more than 5

    I recently purchased a new laptop as my old one died. I tried to authorize it to apply updates however it states I have already authorized more than 5 computers.
    I read in the help files that you can deactivate all through the store option, however it does not show up for me. In another post i read that it only shows up if you have more than two activated devices.
    So I'm stuck. I don't have the option to deauthorize all nor can i authorize becuase it thinks i have more than 5.
    Additionally, i have never used the deauthorize feature. since having owning an iTunes account and i do not have access to the other computers as they are all long gone. I've also logged out and back into the account to make sure that wasnt an issue.
    Any help would be greatly appreciated.

    Click on iTunes Store (top center of iTunes screen), then Account (under MUSIC LINKS on right of screen).  Enter your Apple ID and password.  On the next screen the last entry under Apple ID Summary should look like this:
    If you don't have access to some or all of your authorized computers you can click the Deauthorize All button, then reauthorize those that you're currently using.  I don't recall there being a scenario where Deauthorize All would not appear based on the number of authorized systems.

  • I have a new Palm Pre Plus - can I have more than one Google G-Mail Account on the phone?

    I have a general G-Mail account and it has started getting too busy with advertisements etc.  I'm thinking about changing to a different e-mail address but don't know what yet.
    I have an old Palm Centro I used to Synch with my laptop.  Now I need to do this with G-Mail.  So I created a unique g-mail account that would only contain my calendar and contact information - i called it "palm.last name" - made sense to me.
    When I try to add it to my Palm Pre Plus I am unable to sign in.  I'm wondering if you are limited to the number of Gmail e-mail accounts you can have on the phone.  If i can only have 1 then I don't want my e-mail to be "palm.last name" and give that out to people - that would not make sense to them. 
    I already have a Yahoo Account and I'm thinking about another Yahoo Account to keep some e-mails and instant messages separate from my personal Yahoo.  If I cannot add more than 1 account, this is going to be a problem.
    Thank you for any assistance you can provide.

    Hi, and welcome to the Palm Support Community.
    You should be able to add your second Gmail account without any problem...I have two Gmail accounts on my Pre and have no difficulties.
    When you say you are unable to "sign in", I assume you mean you are unable to sync the email and calendar on your new account?  Double-checking your user name and password are the only things that come to mind.
    smkranz
    I am a volunteer, and not an HP employee.
    Palm OS ∙ webOS ∙ Android

  • TS1702 Does any one know how to solve this iPod touch error: I am tryin to pay for an app but I can because it says that I don't have enough space when I actually have more than enough space to download it so please help me

    Does anyone know how to solve this problem: I a trying to download a paid app but I cannot because the AppStore says that info not have enough space to download it even though I have more than enough space so if any of you know what can solve this problem then please let me know

    The app is compressed and needs swap space to install. As a rule of thumb you need 3 times the listed size of the app available, or in your case 4.6GB. You only have 1.7GB.

  • Problems when using outlook and outlook express, cannot send more than app 100 KB.

    Since app 6 weeks ago we have problems when sending pictures etc, we cannot send more than app 100KB. If we send more there is error code
      Socket Error 10053, Error number 0x800CCC0F. Your server has unexpectedly terminated the connection.
    I have made no changes to either computer. Restoring the laptop to Nov 2011 made no difference.We use Outlook Exlorer and Outlook.
    When I take my laptop to my neighbors house, who has Time Warner, I can send 10MB files without any problems, using the EXACT same settings.
    Spending over 2 hours with a very informed Verizon technician on the phone did nothing.
    I first blamed our server, turns out the culprit is Verizon. 
    Any ideas?
    Eugene

    Good Morning,
    Are you able to send attachments on webmail.verizon.net?
    Shamika_Vz
    Verizon Support
    Notice: Content posted by Verizon employees is meant to be informational and does not supersede or change the Verizon Forums User Guidelines or Terms or Service, or your Customer Agreement Terms and Conditions or Plan.

Maybe you are looking for