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 / Invalid argument type ...
Power Apps
Unanswered

Invalid argument type (Table). Expecting a Text value instead. -- ForAll() error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Please see attached screenshot for error. Any suggestions? 

My solution code: 

 

Clear(D1_CollItems_Edit);
Set(D1_ItemsString_Edit, Left(D1_ItemsString_Edit, Len(D1_ItemsString_Edit)-1));
ForAll(Split('D1 - Team Identification', "|"), 
Collect(D1_CollItems_Edit, 
{
 D1_FullName_D1_Edit: Text(Last(FirstN(Split(Result,";").Result,1).Result).Result), 
 D1_Role_D1_Edit:Text(Last(FirstN(Split(Result,";").Result,2).Result).Result)
}));

 

 

I'm trying to implement this: https://www.c-sharpcorner.com/blogs/concat-and-forall-in-powerapps

error-msg.png
Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    The article you reference is not an accurate use of ForAll.  ForAll is a function that returns a table.  It should be avoided as being a For/Loop.

     

    Can you explain what 'D1 - Team Identification' is in your formula?  Where is this coming from?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 

    'D1 - Team Identification' (see screenshot) is how power apps has chosen to name my SharePoint multi-line text column. What would you recommend to pull that multi-line column data instead of the ForAll()?

    column.PNG
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Okay, so it is a column in your list.  

    What is it that you are trying to get?  All of the records in your datasource or a particular record from your list to be split.

    What is the name of your datasource?

    And, ultimately, you are splitting this column to show somewhere...where (what control)?

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    See "edit_Screen.PNG" screenshot for example edit screen. My initial Patch() to SharePoint works fine. I want to get the D1_Team_Identification record (see screen shot columns_values.PNG) for a specific ID. The name of the datasource is CAR8D, which is a SharePoint list. I want to split the record in the multi-line column to achieve the same result as the "columns_values.PNG" screenshot. 

     

    I hope that makes sense! Writing data is working, but pulling from the SharePoint multi-line text has been a head scratcher for a couple days now.

    edit_Screen.PNG
    columns_values.PNG
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Ah yes...the first screenshot put the pieces together.  Sorry, end up answering so many posts, I sometimes forget the poster and the app.  Once I saw that I remembered we were corresponding on this app before (and I think I still have some outstanding responses for you).

     

    Have you incorporated the process that I talked about for splitting your form properly?  In other words, do you now have a glbCurrentRecord that contains the record from your datasource?

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 

    Oh! A global current record! When do I create that? Can you link documentation for that.

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Yes, it was all described in the video that I sent you the link for before.

    You should have a variable that contains your record.  Your forms should be linked by that variable and you should be using the SubmitForm to submit the form.

    If you have that variable, then we can populate the Gallery of items off of it without any complexity.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes 

    Ok I will re-watch, and make those changes on a copy of my app. I'll report back.

    Thank you again sir!

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @Anonymous 

    Yes, please give that a go.  It will simplify what you are doing with the multiple forms and, as a bonus, you will have a global variable (if you happen to follow the same name as I have in the video - glbCurrentRecord) and from that we can populate the gallery of the items based on a split of the text column in your record.  

    Let me know how you do on the forms and putting them together properly and if you need any help with that, then we can cross the bridge of getting these records in your gallery.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @RandyHayes

    Hello again! I setup the forms in the way the video described. Please see word document with screenshots. The Edit screen has multiple forms connected to a master form. It gets submitted with a SubmitForm(). I see this is a much simpler method to editing forms. However, still unsure about the multi-line columns. 

     

    How would you go about getting records in the galleries like the previous functionality?

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 350 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard