Forum Discussion

Deleted's avatar
Deleted
Oct 30, 2023

Choice column in a list - data validation

Hello,

I have a list in Sahrepoint with 3 columns, let's say Brand, Date and Status which is choice type column with 3 possibilities (Open, Pending, Finalized). I have a list of brands and a flow in powerautomate that every week creates new items in a list for each brand. For example Nike is in a list of brands so flow will create an item: Nike(Brand), 30.10.2023(Date), Finalized(Status) - for other brands the same. Next week it will create the same items but with different dates. Users have the ability to change the status but i want to do sth like this:

Open status would only be available for Nike on one date, so Nike cant have the status Open for 30.10.2023 and 23.10.2023 at the same time. User will have to change the status to Pending or Finalized to "Open" aonther one.

Note: Puma can have the status Open on the same date as nike but the status cant be Open for two or more Nike or Puma items atone time.

I hope it is understable 

  • Kelly_Edinger's avatar
    Kelly_Edinger
    Bronze Contributor

    Hi Deleted - you'll want to add conditions to your flow. First, add the SharePoint action to Get Items and point to your List. (if this is a big list, you'll likely want to break it up into List Views and then have the workflow only cycle through a particular view rather than the entire list).

     

    Add a Condition that looks for brand = Nike and status doesn't equal Open. If there isn't an Open item for Nike in that View then it can create the List Item. Repeat for the other brands.

     

    Hope that helps. 

Resources