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 / Saving a Collection to...
Power Apps
Answered

Saving a Collection to Sharepoint with numerical coloumns

(0) ShareShare
ReportReport
Posted on by 30

I have canvas app that collects data for a sharepoint list. To implement offline-caching I have created a colelction that stores the data from the form and uploads it later.

Collect(
ItemCache,
{
Title: DataCardValue9.Text,
OperatingHours: (Value(DataCardValue10.Text)),
NextInspection: InspectionDate.SelectedDate,
Servicerequired: DataCardValue12.Value,
Reason_x0020_for_x0020_service: ListBox1.SelectedItems,
Comments: DataCardValue14.Text

}
)

The text in red is causing issues (it seems) in the save:

Collect('mySharepointList',ItemCache)

If I don't use the "Value" I get a "incompatible type" error, if I use the "Value" I get an error "The specified couloumn "Value" does not exist"...

 

Any help would be appreciated.

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @WB_Sharevision 

    Hi there!  Your post mentioned some text highlighted in red.  However, I do not see any highlight text.  Could you please reply to this message and share the problematic code line?

     

    Thanks 😄

  • WB_Sharevision Profile Picture
    30 on at

    Sorry for B/W version, I fixed the original post to display the red line. 🙂

  • mdevaney Profile Picture
    29,993 Moderator on at

    @WB_Sharevision 

    I am reviewing your code and do not see any errors.  I'd like to ask a few questions.

     

    • What is the full "incompatible error"?  It usually gives an expected type.
    • When is ItemCache first Collected?  Can you share the code?
    • What value are you inputting into DataCardValue10?  Please also take a screenshot of that input control

     

     

     

  • WB_Sharevision Profile Picture
    30 on at

    @mdevaney  Sorry for the delay and thx for taking time for my problem.

     

    DataCardValue10 is a textfield, but only expects numbers (Annotation 2019-10-15 073503.png). The full error is in ErrorMsg.png. It actually point to the "Collect" method with an underlined "ItemCache" in the Timer event.

     

    ItemCache is initialized in the OnVisible of the StartScreen:

    ...
    ClearCollect(ItemCache,true);LoadData(ItemCache,"ItemCache",true);
    ...
    Annotation 2019-10-15 073503.png
    ErrorMsg.png
  • mdevaney Profile Picture
    29,993 Moderator on at

    @WB_Sharevision 

    Please show your code for the property in Timer2.OnTimerEnd (screenshot).  In your picture I can see you have an error due to a Text value being supplied.

     

    Also, I find this code to be peculiar.  I am not familar with the technique of initializing a collection with a value of True.  Perhaps you can share more on your coding choice here.  Perhaps loading ItemCache with a single variable here and many columns elsewhere is confusing PowerApps

     

    ClearCollect(ItemCache,true);

     

    To clear an existing collection I would typically just use this

     

    Clear(ItemCache); 
  • Verified answer
    WB_Sharevision Profile Picture
    30 on at

    Somehow is missed the notification of your reply.

     

    In the meantime I worked around the problem by changing the sharepoint coloumn to accept TEXT. Now it works... 😕

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 411 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 338

#3
WarrenBelz Profile Picture

WarrenBelz 256 Most Valuable Professional

Last 30 days Overall leaderboard