cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Djurres
New Member

PenInput is not always submitted in database

Hi folks,

 

I want to store a peninput as JSONBase64 into my db.

 

Right now I'm using a patch function;

    Patch(
        '[---].[malfunctionform]';
        LookUp(
            '[---].[malfunctionform]';
            id = Value(DataCardValue29.Text)
        );
        {signature: JSON(signatureInput.Image;JSONFormat.IncludeBinaryData)}
    )

 When I run this command on preview on the PC, the data is fetched correctly and stored in the DB.

When I push it to the phones, it is not storing the signature in the DB. Why does this happen?

2 REPLIES 2
v-jefferni
Community Support
Community Support

Hi @Djurres ,

 

Do you want to save Pen input image as binary64 text format into MySQL database?

Could you please share more details about the result? Did the app not save anything in to DB with phones? Have you tried to patch a new entry into the DB and check the result?

 

I made a test on my side with a on-premise SQL Server and a Text column to store the Json base64 text:

64.png

This is my formula to test updating signature into the DB:

65.png

I tried on PC and iPhone and both worked to update the text into SQL Server:

66.png

Could you please share the details about the background of the using phones and Power Apps version? My test environment is iOS version 13.6 with Power Apps version 3.20093.35.

 

Please try to update Power Apps if you are on earlier versions and test again. If you have further information, please feel free to let me know.

 

Hope this helps.

 

Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-jefferni 

 

Thanks for your response.

 

Im running multiple phones. Couple iPhones, couple android phones, I dont think its in the phones.

One of the diffrences is that I am using MySQL instead of MSSQL.

 

If I want to patch a signature & another column, it doesnt patch the signature and it does patch the other column.

Right now I found out aswell that its only the first entry after a push which is not getting saved. If I do push the app and I want to store 9 different entry's, 8 will be saved correctly, but the first one is missing.

 

What I've done so far; make the code longer by checking if a signature is made.

In the last If i'm checking if the base64 is exactly the same as the output which should have been stored in the db.

There it goes to the notification that a problem has occured.

 

This one is frustrating..

 

 

Reset(signatureEmpty);;
Set(
    sigImage;
    JSON(
        signatureInput.Image;
        JSONFormat.IncludeBinaryData
    )
);;
Set(
    sigEmpty;
    JSON(
        signatureEmpty.Image;
        JSONFormat.IncludeBinaryData
    )
);;
If(
    sigImage <> sigEmpty;
    Patch(
        '[***].[malfunctionform]';
        LookUp(
            '[***].[malfunctionform]';
            id = Value(DataCardValue29.Text)
        );
        {signature: Text(sigImage)}
    );
    Notify("NOPE!")
);;
If(
    LookUp(
        '[***].[malfunctionform]';
        id = Value(DataCardValue29.Text);
        signature
    ) = Text(sigImage);
    Patch(
        '[***].[malfunctionform]';
        LookUp(
            '[***].[malfunctionform]';
            id = Value(DataCardValue29.Text)
        );
        {closed: 1}
    );;
    Notify("Storing is succesvol goedgekeurd!") && Reset(signatureInput) && Navigate(
        browseMalfunctions;
        ScreenTransition.Fade
    );
    Notify(
        "Er is een fout opgetreden. Probeer opnieuw";
        NotificationType.Error
    ) && Reset(signatureInput) && Navigate(
        browseMalfunctions;
        ScreenTransition.Fade
    )
)

 

 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,064)