locked
Auto-fill column based on dropdown selection RRS feed

  • Question

  • Ok,

    So I have an entity (A) that contains two attributes that are entities (B, C) in the same model. When I select a value from entity B I want it to populate the entity C column. B to C is a 1 to Many relationship. Is this possible in MDS 2012 from either the web application or the Excel add-in?

    Also, is it possible from the Excel add-in to narrow down my search of a dropdown list by typing in either the name or code?

    Monday, May 21, 2012 9:31 PM

Answers

  • One way to default values for a member is by using Business Rules.

    If the number of members in Entity B and C is small, you can create BR that defaults value of Column C based on D. Of course this is assuming you already have the mapping in place.

    If not you can also create Custom Workflow and run as BR. Check out this link for more info on Custom Workflow (http://msdn.microsoft.com/en-us/library/hh270298.aspx)

    Regards

    Hari


    Hari (Microsoft)

    Tuesday, May 22, 2012 5:31 AM
  • Hi Jon,

    I assume when you say entity attributes you mean DBA (domain based attribute) Attributtes. As of now you cannot create a 1 to many relationship between 2 DBA attributes in a entity thus you cannot auto-fill C based on values on B unless you create a business rule as Hari suggest to do this for you.

    To enforce the correctness of the B to C relationship you need to create a business rule for each possible value for B and put a constrain on possible values for C.

    In the example bellow I say that for Color Black (Color is the B column and black is a possible value) then the Style must bge NA or W (the Style is the C column in your case).


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 25, 2012 12:15 AM
  • It sounds like what you want is a conditional picklist. So if you have

    Entity B = Color Categories { Red, Blue, Green } and

    Entity C = Colors, with DBA to B, so effectively, { {Red, Crimson}, {Red, Maroon}, {Red, Scarlet},  {Blue, Navy}, {Blue, Aqua}, ...}

    Then when you load Entity A and select Color Category Red, then the choices for Color are limited in the picklist to Crimson, Maroon, Scarlet.

    Is that what you are after? You could possibly do it with a macro based on when the value in the cell under Color Category column changes. You could also implement the rules in MDS to enforce the expected relationships, as described above. You might also look at derived hierarchies for managing these kinds of relationships, but that will help more with navigating and viewing/reporting than editing, as there is no filtering for value selection there either.

    Friday, June 1, 2012 11:56 PM

All replies

  • One way to default values for a member is by using Business Rules.

    If the number of members in Entity B and C is small, you can create BR that defaults value of Column C based on D. Of course this is assuming you already have the mapping in place.

    If not you can also create Custom Workflow and run as BR. Check out this link for more info on Custom Workflow (http://msdn.microsoft.com/en-us/library/hh270298.aspx)

    Regards

    Hari


    Hari (Microsoft)

    Tuesday, May 22, 2012 5:31 AM
  • Hi Jon,

    I assume when you say entity attributes you mean DBA (domain based attribute) Attributtes. As of now you cannot create a 1 to many relationship between 2 DBA attributes in a entity thus you cannot auto-fill C based on values on B unless you create a business rule as Hari suggest to do this for you.

    To enforce the correctness of the B to C relationship you need to create a business rule for each possible value for B and put a constrain on possible values for C.

    In the example bellow I say that for Color Black (Color is the B column and black is a possible value) then the Style must bge NA or W (the Style is the C column in your case).


    This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, May 25, 2012 12:15 AM
  • It sounds like what you want is a conditional picklist. So if you have

    Entity B = Color Categories { Red, Blue, Green } and

    Entity C = Colors, with DBA to B, so effectively, { {Red, Crimson}, {Red, Maroon}, {Red, Scarlet},  {Blue, Navy}, {Blue, Aqua}, ...}

    Then when you load Entity A and select Color Category Red, then the choices for Color are limited in the picklist to Crimson, Maroon, Scarlet.

    Is that what you are after? You could possibly do it with a macro based on when the value in the cell under Color Category column changes. You could also implement the rules in MDS to enforce the expected relationships, as described above. You might also look at derived hierarchies for managing these kinds of relationships, but that will help more with navigating and viewing/reporting than editing, as there is no filtering for value selection there either.

    Friday, June 1, 2012 11:56 PM