cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
seadude
Memorable Member
Memorable Member

Value must be at most 1 character in length. Error

Ugh! Almost through my first PowerApps to Azure SQL connection!


Here is my table in SQL:

 qself_table.png


Here is my Patch command in PowerApps

Patch('[dbo].[QSelf]',
    Defaults('[dbo].[QSelf]'),
    {lat: status_lat.Text,
     long: status_long.Text,
     altitude: status_alt.Text,
     user: status_user.Text,
     notes: input_notes.Text,
     image: text_takenImage.Text,
     date: DateValue(Text(status_date.Text,"[$-en-US]yyyy-mm-dd")),
     time: status_time.Text
    });

Here is the error:

Value must be at most 1 characters in length.


Any clues as to where the error is occurring? This is my first time ever working with SQL, so pardon my ignorance.


Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
v-micsh-msft
Community Support
Community Support

According to your table column definition, you have the following columns set to Not NULL:

date,

time,

lat,

long,

ID

All those fields need to be inputted with valid value when creating new records.

Which means:

Status_lat.text

status_long.Text

status_date.Text

status_time.Text

need to be filled with valid string within it, if you have the ID set as Auto Increment from the SQL Server side (if not, then the ID field is also required in the record syntax).

 

    {lat: status_lat.Text,
     long: status_long.Text,
     altitude: status_alt.Text,
     user: status_user.Text,
     notes: input_notes.Text,
     image: text_takenImage.Text,
     date: DateValue(Text(status_date.Text,"[$-en-US]yyyy-mm-dd")),
     time: status_time.Text}

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-micsh-msft
Community Support
Community Support

According to your table column definition, you have the following columns set to Not NULL:

date,

time,

lat,

long,

ID

All those fields need to be inputted with valid value when creating new records.

Which means:

Status_lat.text

status_long.Text

status_date.Text

status_time.Text

need to be filled with valid string within it, if you have the ID set as Auto Increment from the SQL Server side (if not, then the ID field is also required in the record syntax).

 

    {lat: status_lat.Text,
     long: status_long.Text,
     altitude: status_alt.Text,
     user: status_user.Text,
     notes: input_notes.Text,
     image: text_takenImage.Text,
     date: DateValue(Text(status_date.Text,"[$-en-US]yyyy-mm-dd")),
     time: status_time.Text}

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,250)