cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cnorris3570
Helper I
Helper I

Filtering a list the Concatenating the result

Hi all

 

I have screen with a Display form on left side that a user has filled out already (on a previous screen on another day) and on the right side of the screen a Edit form that will update the same record with a user filling out additional fields.  

 

1.)In the DISPLAY form, it has a filled in field called Business Unit that is tied to a table called Business Unit Approvers.   in the EDIT form, i have a field called CER Number that will 

 

  1. based on the result from the Business Unit field in the display form, Filter on the Business Unit Approvers table and bring back the Code field from that table.  I tried this code: Filter(Business Unit Approvers, Business Unit = Datacardvalue65.selected.... ) this is as far as i got because the only option i have after .selected. is value and that throws a "Expected Text Value" error.
  2. THEN Once i get this to work, i would like to concat the formula result (Code) and create a unique number:  concat(Code,yy,000ID) to populate the field.  So something like this

Concat(Filter(Business Unit Approvers, Business Unit = Datacardvalue65.selected.... )Code,yy,000ID)

ive literally been trying to figure this out all day.  Can someone help me here please?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @cnorris3570 ,

Probably something like this

Concat(
   Filter(
      'Business Unit Approvers', 
      'Business Unit' = Datacardvalue65.selected.whatever
   ),
   Code & 
   Text(
      Today(),
      "yy"
   ) & 
   If(
      ID < 10,
      "000",
      ID < 100,
      "00",
      ID < 1000,
      "0"
   ) & ID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

5 REPLIES 5
WarrenBelz
Super User
Super User

Hi @cnorris3570 ,

Assuming 000ID is a number here, you should need

Concat(
   Filter(
      'Business Unit Approvers', 
      'Business Unit' = Datacardvalue65.Selected.whatever
   ),
   Code &
   "yy" &
   000ID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

cnorris3570
Helper I
Helper I

for starters the ID on the 000 is from the SP list.

@cnorris3570 ,

So you added it at the end (it is a number) ?

Concat(
   Filter(
      'Business Unit Approvers', 
      'Business Unit' = Datacardvalue65.Selected.whatever
   ),
   Code & "yy" & ID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

cnorris3570
Helper I
Helper I

 thank you warren for responding.  i shouldve also mentioned that the yy stands for the year 22.

yes, the 000 is supposed to be sequential number going up with each entry.  Obviously the ID will go up but when it gets  to a 0009 (9 being the ID), i was hoping it would go to 0010...... i flat dont know how to do that either.

thank you so much for responding to me.

Hi @cnorris3570 ,

Probably something like this

Concat(
   Filter(
      'Business Unit Approvers', 
      'Business Unit' = Datacardvalue65.selected.whatever
   ),
   Code & 
   Text(
      Today(),
      "yy"
   ) & 
   If(
      ID < 10,
      "000",
      ID < 100,
      "00",
      ID < 1000,
      "0"
   ) & ID
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,257)