web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Repeat string values o...
Power Apps
Answered

Repeat string values on Concat

(0) ShareShare
ReportReport
Posted on by 147

So, this is the scenario, I have a Gallery with items, and 1 slider control, where the max value is their stock on the source table.
The slider represents the pieces to request, so someone can use the slider to select a specific number of pieces that they want to use, but never exceeding the stock.
Now, for the consumption registry, I need to me to have a string with the item, repeated so many times as the slider value is set.

Example: The item is apple, stock is 5, I selected 2 on slider, the string should be: apple;apple

Finally, I expect to see requests like this

apple;apple;banana;banana;banana;orange

This works for me because I see information about their locations and other information operations, so use a string like
apple(2);banana(3);orange(1)
Doesn't work for my app.

This is my current string to concatenate the selected Values:
Concat(Filter(Gallery1.AllItems,Slider1.Value > 0).Title, Title &";")

But with this, isn't considering the slider value, so appears: apple;banana;orange

As previously mentioned I can use this, but for other information operations is more complicated to use to other App functions. 

Concat(Filter(Gallery28.AllItems,Slider1.Value > 0).Title, Title & " (" & Slider1.Value & ")" & ";")

I tried 2 ways without success:

 

1:
ForAll(Filter(Gallery28.AllItems,Slider1.Value > 0),
 Concat(Filter(Gallery28.AllItems,Slider1.Value > 0), Title &";")

)

2:
Concat(Filter(Gallery28.AllItems,Slider1.Value > 0),ForAll(Filter(Gallery28.AllItems,Slider1.Value > 0), Title &";"))

I think this should be easy, but sincerely I don't have more ideas for now.

 

Any ideas?

Categories:
I have the same question (0)
  • Verified answer
    RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @FMontesRNX1 

    Please consider changing your Formula to the following:

    Concat(
     Filter(Gallery1.AllItems,Slider1.Value > 0).Title As _item, 
     Concat(Sequence(Slider1.Value), _item.Title & ";")
     )
    )

     

    I hope this is helpful for you.

  • FMontesRNX1 Profile Picture
    147 on at

    It works!
    Thanks a lot
    Regards

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 633

#2
11manish Profile Picture

11manish 588

#3
Valantis Profile Picture

Valantis 457

Last 30 days Overall leaderboard