Dependence of a selection list on an attribute

We have an "Invoice" class, which contains documents that belong to either the "Template" or the "Receipt" category (simple selection from the list of categories).

A document in the "Invoice" class is always assigned to a project (simple selection from the list of projects). A project can be a main project or a follow-up project (Boolean attribute).

Now there is the challenge that documents in the "Template" category can only be assigned to main projects. A document in the category "Receipt", on the other hand, can be assigned to a project regardless of whether it is a main or follow-up project. So I would need a filter for project selection that depends on the category.

Unfortunately, I can't think of a solution for how to implement this. Does anyone have an idea how I can relay this?

Parents
  • One potential solution that comes to mind (I didn't test this):

    Set up two project properties on the Invoice class, one which lists all projects (let's call it Project) and another which only lists the main projects (let's call it Main project). The Main project property is filtered by the Boolean attribute on the Project object to only display main projects.

    Then with metadata card configuration set up two rules:

    • If Category = Template, show Main project property and hide Project property
    • If Category = Receipt, show Project property and hide Main project property

    Now depending on the category selection the users see the relevant property which should fulfill your requirement. (A third rule could be used to hide both project properties by default so that only after the category selection one of them is displayed, to avoid confusion from initially having both of them on the metadata card.)

    You'll need to consider if this approach causes any issues with your other configuration since the project information is recorded in different properties across the invoices. Technically it would be also possible to automatically copy the value from the Main project property to Project property so that regardless of the category the Project property has the project selection.

  • It could be easier to enrich the project record with the same category, and then filter the value list of the project property accordingly. The category value of a project can be automated by using the Metadata Card configuration based on the type of project.

Reply Children
No Data