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 / Error: Value must be a...
Power Apps
Answered

Error: Value must be at most 1 characters in length

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

We are facing an issue while Submitting a record on PowerApps: Value must be at most 1 characters in length

Below the screenshot of SQL table, we are using Patch function to write data. But we are not using Sl_No (Primary Key, auto generated in table) in the patch command.

 

ForAll(
    ResponseSQCache,
    Patch(
        '[dbo].[Survey_Response]',
        Defaults('[dbo].[Survey_Response]'),
        {   SR_Identifier: SR_Identifier,
            Survey_Section: Survey_Section,
            Survey_Questions:Survey_Questions,
            Survey_Answer: Survey_Answer,
            Survey: Survey,
            SR_Lon: SR_Lon,
            SR_Lat: SR_Lat,
            Created_On: Created_On,
            Created_By_Name: Created_By_Name,
            Created_By_Email: Created_By_Email,
            Created_By_Designation: Created_By_Designation,
            Team: Team,
            Role: Role,
            Survey_Task_Name: Survey_Task_Name,
            WRENCH_Task_ID:WRENCH_Task_ID,
            Privacy_Acceptance:Privacy_Acceptance
        }
    )
)

 

Any thoughts on this would be very helpful.

 

Thanks in advance.

 

Untitled.jpg

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Anonymous,

     

    As the error says, it seems that one of the fields you're trying to patch stays empty and SQL server has a requirement for it to be at least 1 character. This is seems to be SQL server side issue.

     

    Have you tried looking into which field you're patching stays empty?

     

    Max.

  • v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    Could you please share more details about the error message within your Patch formula?

    Which field is the error related to?

     

    Based on the SQL Table columns screenshot that you provided, I could not find any error with it. Please consider modify your formula as below:

    ForAll(
     ResponseSQCache,
     Patch(
     '[dbo].[Survey_Response]',
     Defaults('[dbo].[Survey_Response]'),
     { 
     SR_Identifier: ResponseSQCache[@SR_Identifier],
     Survey_Section: ResponseSQCache[@Survey_Section],
     Survey_Questions: ResponseSQCache[@Survey_Questions],
     Survey_Answer: ResponseSQCache[@Survey_Answer],
     Survey: ResponseSQCache[@Survey],
     SR_Lon: ResponseSQCache[@SR_Lon],
     SR_Lat: ResponseSQCache[@SR_Lat],
     Created_On: ResponseSQCache[@Created_On],
     Created_By_Name: ResponseSQCache[@Created_By_Name],
     Created_By_Email: ResponseSQCache[@Created_By_Email],
     Created_By_Designation: ResponseSQCache[@Created_By_Designation],
     Team: ResponseSQCache[@Team],
     Role: ResponseSQCache[@Role],
     Survey_Task_Name: ResponseSQCache[@Survey_Task_Name],
     WRENCH_Task_ID: ResponseSQCache[@WRENCH_Task_ID],
     Privacy_Acceptance: ResponseSQCache[@Privacy_Acceptance]
     }
     )
    )
    

     

    If the issue still exists, please consider re-create a new connection to your SQL Table from your app, then check if the issue is solved.

     

    Best regards,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    There was a row value empty on SQL table. Once the same is deleted from table, this issue got resolved.

     

    Thanks for the support

     

     

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 221 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 188 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 120

Last 30 days Overall leaderboard