cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Microsoft
Microsoft

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,746)