locked
Populate Name and Code automatically through MDS interface? RRS feed

  • Question

  • Hello,

    Is it possible to populate the Name and Code automatically when creating an entity record through the MDS website?

    Through a business rule or something of that nature...

    Here's why I'd want this. I have an Employee Quota Model with an Employee Entity and a Quota entity the Quota ties to the Employee table through domain attrib. I want to make it so that when data entry staff are entering a quota for an employee that they don't first have to create a quota name and code before entering the actual quota info, they should not have to worry about coming up with a name or code for the Quota entry, rather they should just pick the employee from the Employee dropdown and enter the quota info and that's it.

    If that is not possible, would it be possible to add a Quota record automatically(without quota info filled in), when an employee is added? This way, a user can just go to the interface and enter the quota info for the row of that new employee, without worrying about quota name and code entry.

    Any advice appreciated.

    Thanks


    --ACG




    • Edited by ACG Friday, May 4, 2012 5:38 PM
    Friday, May 4, 2012 5:11 PM

Answers

  • I think there are a couple of ways you can accomplish this.  When you create the entity, you can specify the code as being system generated.  Then, when you create a new record, the code will be automatically generated and populated.  You can then set a business rule to populate the name with a defaul value.  The user should be able to leave this column blank at the time they are filling out the record.  When the business rule is applied, it will populate that field with however you have defined it.  This should accomplish what you are looking for which just selecting an employee as your DBA and then adding the quota and saving.

    hope this helps.

    • Marked as answer by ACG Monday, May 7, 2012 7:55 PM
    Monday, May 7, 2012 4:38 PM

All replies

  • I think there are a couple of ways you can accomplish this.  When you create the entity, you can specify the code as being system generated.  Then, when you create a new record, the code will be automatically generated and populated.  You can then set a business rule to populate the name with a defaul value.  The user should be able to leave this column blank at the time they are filling out the record.  When the business rule is applied, it will populate that field with however you have defined it.  This should accomplish what you are looking for which just selecting an employee as your DBA and then adding the quota and saving.

    hope this helps.

    • Marked as answer by ACG Monday, May 7, 2012 7:55 PM
    Monday, May 7, 2012 4:38 PM
  • Thanks for your reply! I think this would apply to SQL 2012 and we're on 2008 R2. I'm not seeing the ability to set system generated on the entity. Or is it somewhere else?

    --ACG

    Monday, May 7, 2012 7:30 PM
  • Thanks, your right.  I was talking about 2012.  In 2008 R2, you can create a business rule defaulting the code.  Then, when you try to add a record through the MDS interface, you will not even see the code field, its hidden and will be populated through the business rule. 
    Monday, May 7, 2012 7:45 PM
  • Ah, I see, an auto-gen business rule for both attribs will do the trick at the interface level and no need for user to enter either.

    --ACG


    • Edited by ACG Monday, May 7, 2012 7:55 PM
    Monday, May 7, 2012 7:55 PM
  • The annoying thing is that the interface still takes you to the Name field entry even though you have it set to auto-gen also, so you still have to hit the save button there before getting into the main data entry.

    --ACG

    Monday, May 7, 2012 8:33 PM
  • agreed on the annoying.  I don't know of another way to make it act like a more traditional default value.
    Tuesday, May 8, 2012 2:22 PM