Filter a record based on user condition

Hi! I have developed a site and I want it to be filtered for each user based on its condition (supplier name). Basically, my idea is to use the site as a "Supplier Portal", so each supplier can only see its own Purchase orders and invoices. To be clear, I want this:

- User 1 is the supplier 1 in real life. I want Appian to know that he is Supplier 1, and filter the records with this condition (in the record it would be nomProveedor = Supplier1)

I have thought about the options but I would want your expertise and advice:

1) Create a record type (username - supplier), and use this information to filter the record (I have doubts on the steps to achieve the supplier field based on the username and how to put it into a filter/query. 

2) Create a previous interface in which the user identifies himself with the supplier name (F.e. supplier 1) , and use this variable to filter

3) Create a group for each supplier and give permissions (it would be fine for 3 or 4 suppliers, but not viable for a lot of suppliers)

Any help would be useful!  Thank you so much

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi,

    The third option is definitely not !!

     You can create a record using the CDT you use for Purchase orders and invoices (If these are two different entities add a relationship in the record). and In the Source filters add a filter condition like nomProveedor = loggedinuser.

     

  • That sounds good! Do you mean to use the filter into the interface or at the Record Level Security?

    Also, the nomProveedor is filled by the user (dropdown, 4 choices, I obtained the values pointing a constant with the list of supplier names).

    I have no problem with the rest of fields, but If I put a filter like nomProveedor= "Proveedor 1", it doesnt work properly. When I use a filter of a field that is filled via dropdown it doesnt work unless I put nomProveedor= cons!(name)[numberOfRow]

    Do I have to put the dropdown values directly as a text instead of a constant?

Reply
  • That sounds good! Do you mean to use the filter into the interface or at the Record Level Security?

    Also, the nomProveedor is filled by the user (dropdown, 4 choices, I obtained the values pointing a constant with the list of supplier names).

    I have no problem with the rest of fields, but If I put a filter like nomProveedor= "Proveedor 1", it doesnt work properly. When I use a filter of a field that is filled via dropdown it doesnt work unless I put nomProveedor= cons!(name)[numberOfRow]

    Do I have to put the dropdown values directly as a text instead of a constant?

Children