cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

Concat returning only last item multiple times

I have a gallery which has a collection to enter multiple goals. When I am trying to generate a JSON from the collection items the JSON is returned with only last item repeated number of times as the number of items.

 

From the below screenshot, I should expect the JSON to return...

[{"APSTFocusArea":"fg","GoalTitle":"sf","AchieveBy":"May 20, 2019","IWill":"ggg","SoThat":"fg","Strategy":"gggggggggggggggg","ProgressNotes":"sf"},{"APSTFocusArea":"j","GoalTitle":"jhh","AchieveBy":"May 20, 2019","IWill":"hj","SoThat":"gj","Strategy":"jjjjjjjj","ProgressNotes":"jklljh"}]

 

But the value returned is

[{"APSTFocusArea":"j","GoalTitle":"jhh","AchieveBy":"May 20, 2019","IWill":"hj","SoThat":"gj","Strategy":"jjjjjjjj","ProgressNotes":"jklljh"},

{"APSTFocusArea":"j","GoalTitle":"jhh","AchieveBy":"May 20, 2019","IWill":"hj","SoThat":"gj","Strategy":"jjjjjjjj","ProgressNotes":"jklljh"}]

 

The formula I used is

 

Concat(
GoalsCollection,
",{""APSTFocusArea"":""" & APSTFocusArea_1.Text & """,""GoalTitle"":""" & GoalTitle_1.Text & """,""AchieveBy"":""" & AchieveBy_1.SelectedDate & """,""IWill"":""" & IWill_1.Text & """,""SoThat"":""" & SoThat_1.Text & """,""Strategy"":""" & Strategy_1.Text & """,""ProgressNotes"":""" & ProgressNotes_1.Text & """}"
)

 

Why would concat pick only the last record multiple times? Has anyone experienced this before?

 

2019-05-20_14-20-15.jpg

 

Thanks in advance,

Manu

3 REPLIES 3
Highlighted
Power Participant
Power Participant

Re: Concat returning only last item multiple times

That's not so strange since you're getting the values from the text boxes and not the collection itself:

 

Concat(
GoalsCollection,
",{""APSTFocusArea"":""" & APSTFocusArea_1.Text & """,""GoalTitle"":""" & GoalTitle_1.Text & """,""AchieveBy"":""" & AchieveBy_1.SelectedDate & """,""IWill"":""" & IWill_1.Text & """,""SoThat"":""" & SoThat_1.Text & """,""Strategy"":""" & Strategy_1.Text & """,""ProgressNotes"":""" & ProgressNotes_1.Text & """}"
)

Change all the text boxes to the underlying field (column) in the collection, and it will work!

 

Concat(
GoalsCollection,
",{""APSTFocusArea"":""" & Collection_column1 & """,""GoalTitle"":""" & GoalTitle_1.Text & """,""AchieveBy"":""" & AchieveBy_1.SelectedDate & """,""IWill"":""" & IWill_1.Text & """,""SoThat"":""" & SoThat_1.Text & """,""Strategy"":""" & Strategy_1.Text & """,""ProgressNotes"":""" & ProgressNotes_1.Text & """}"
)

Good luck!

Highlighted
Community Support
Community Support

Re: Concat returning only last item multiple times

Hi @manu0417 

 

Do you test with @BitLord69 's suggestion?

If it works ok,please accept it as solution.

 

Best Regards.

Yumia

Highlighted
Anonymous
Not applicable

Re: Concat returning only last item multiple times

Hi @manu0417 can you review the above replies and update the thread if they were helpful? 

 

Thank you,

 

@Anonymous 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (5,774)