Forum Discussion

SaraB's avatar
SaraB
New Contributor III
2 years ago

Restricting mappings one to one

When mapping an item from the "Validate" step in the workflow, it is possible to save the mapping to an "(unassigned)" item.
Is it possible to restrict the storage of the mapping so that it cannot be mapped to "unassigned"?

Thank you

  • Hi Sara,

    Unassigned is a valid and out-of-the-box option that is always available. It cannot be removed from the list.

    This is one of these cases where it sounds like it could be addressed via user training especially considering that the worst case scenario is that the user will see a new error after the incorrect mapping and will have to map it correctly in order to successfully validate i.e.: no harm to the system/data.

    From a technical point of view, you could, however, potentially track the save changes action and raise an error / exception using the WcfEventHandler preventing the unassigned option from being selected by, for example, a non-admin user.

  • FredLucas's avatar
    FredLucas
    Contributor III

    Hi Sara,

    Unassigned is a valid and out-of-the-box option that is always available. It cannot be removed from the list.

    This is one of these cases where it sounds like it could be addressed via user training especially considering that the worst case scenario is that the user will see a new error after the incorrect mapping and will have to map it correctly in order to successfully validate i.e.: no harm to the system/data.

    From a technical point of view, you could, however, potentially track the save changes action and raise an error / exception using the WcfEventHandler preventing the unassigned option from being selected by, for example, a non-admin user.

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi Sara,

    Not exactly sure I follow your thought exactly. "(Unassigned)" is the default mapping of any unmapped item. The user or admin has to ensure that the mapping is kept up to date so that each source member has a target it is mapped to. The error message you see is to point out to the user that there is a mapping missing and that someone has to update it.

    If you would like to map all unmapped items to a dummy member, you can e.g. do that in the Mask mapping by mapping * to None (or any other member you prefer to use). That way, is prior mappings to not apply, the member will be mapped (in this case) to None. However, you need to be sure that overall this does not result in data being mapped to wrong target members.

    • SaraB's avatar
      SaraB
      New Contributor III

      Hi,

      The issue here is that an user has saved a mapping of one account to the "unassigned" element, and the error is because there is no account with that name in the model.

      What I wanted to know is if there is a way to prevent users from saving a mapping to an "unassigned" element or saving the mapping without a target member.

      I hope I have explained myself.

      Thank you.

      • Henning's avatar
        Henning
        Valued Contributor II

        I understand now, thank you for the clarification!

        No quick solution comes to mind for this request at the moment. Maybe someone else has had that request before and has better news for you. ğŸ™‚