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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Save and display multi...
Power Apps
Unanswered

Save and display multi line of text values

(0) ShareShare
ReportReport
Posted on by 559

Hi all,

I have a SharePoint list called consumption where two columns are there planned competency and planned asset (both are multi line of text). In PowerApps I have three combo boxes project name, Competency and asset name. When value is selected in combo box I am displaying it in the gallery below. My requirement is when project name, competency and asset name (multi-selected) is selected it must display in gallery and save to SharePoint list also. It must be displayed as I have shared the sample excel screenshot for the same. It must be displayed the same way in gallery and saved to SharePoint in the same way.  On change of the asset name combo box, I have the code attached below. Variable gallery is the variable I have used to concat the asset names and wstring to display in the same line. Gallery details is the collection variable I have given in the items property of gallery.

Any help or suggestions on this, whether it can be done?

Thanks in advance.

 

 

 

 

Categories:
I have the same question (0)
  • EddieE Profile Picture
    4,641 Moderator on at

    @Uthhra 

    You can use Split() to display a string inside a gallery, eg

     

    // gallery items
    Split( wstring, ",")
    

    Note: I'd remove the space at the end of your Concat string creation ie "," instead of ", ". Will just help the Split do it's work

     

    For saving to SP, you could try replacing "," with "<br>" inside your wstring, eg

     

    // example Patch, re-shape to suit your needs
    Patch(
     yourdatasource,
     Defaults(yourdatasource),
     {
     ...
     multiLineColumnName: Substitute( wstring, ",", "<br>")
     ...
     }
    )
    

     

     

  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Uthhra  ,

     

    If my understanding is correct you are saving the combo box data in a multi-line text column and then you want to retrieve it as well(for eg in edit mode or in view mode).

     

    Why not create multi-select choice(checkbox columns ) in SharePoint list for the same?

     

    If you still want to save it to a multiple lines of text column you can store it as a JSON by using JSON function with Patch. See if the below thread helps.

     

    https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-store-JSON-in-SharePoint-and-read-JSON-in-PowerApps/td-p/2327532

     

    Thanks,

  • Sri Profile Picture
    559 on at

    @SanmeshG 

    I cannot create choice columns it must load values based on competency in PowerApps which loads based on conditions from another list. So I made the column as mutli line of text in consumption.

  • Sri Profile Picture
    559 on at

    @EddieE 

    When I tried to save second set of values for Competency and asset name it replaces already saved values. It must save as (for e.g. Project name is peppermint Competency is Data analytics, Asset name is airflow, Byod and second set of values for same Project name peppermint is Competency is F&O, Asset name is test1, test2). it must save and view in the same way. But split and substitute is replacing the current value with the newly added value.

  • EddieE Profile Picture
    4,641 Moderator on at

    @Uthhra 

    In SharePoint, try turning on the setting 'Append changes to existing text' ie

     

    EddieE_0-1707111244070.png

     

  • Sri Profile Picture
    559 on at

    @EddieE 

    Inside gallery for asset name I have given Label, So when I give Split(wString,",") it gives error stating Expected text value.

  • SanmeshG Profile Picture
    1,947 Moderator on at

    Hi @Uthhra ,

     

    Because split returns a table, so you can try first( Split(wString,",").Result

  • EddieE Profile Picture
    4,641 Moderator on at

    @Uthhra 

    That's the correct behaviour. As I mentioned above, you'd use Split( wString, ",") as the Items of a gallery to display the string data.

     

    If you requirement is to display the data in a label inside of an existing gallery then the process is different.

     

    Which way do you want? First is far easier, IMO. Second requires flexible label heights and possible a flexible height gallery, depending on your needs?

  • Sri Profile Picture
    559 on at

    @EddieE 

    Actually my gallery should display two ways. It must display the Consumption list values in the gallery and when the user is selecting the values in the combo box it must display the selected values in gallery and after patching it must display the saved values. Whether both can be done? 

  • EddieE Profile Picture
    4,641 Moderator on at

    @Uthhra 

    Yes, can be done. However, I think you'll need to setup your data differently to achieve what you want. 

     

    For example, how will 'Data analytics' know that 'Airflow, BYOD' is it's related text? You have 2 Multi line of Text fields with just text in them. Are you separating the data using some sort of other delimiter other than a comma?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard