cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jasmin_Sch
Helper IV
Helper IV

NULL value in gallery items causing Errors?

Hi!

 

I am facing hundres of errors in my app saying:

 

Value can not be converted into number because value is an empty string

 

OR

 

An empty text can not be converted into a number.

 

 

My situation:

I created two apps (repeating table via gallery). One to create a work package and one edit a existing work package.

 

I had the same errors on my app to create a new work package and I replaced all values like this:

 

From this: GJ24Q3APV: Value('Input GJ24Q3'.Text)

 

To this:

GJ24Q3APV: IfError(

                Value('Input GJ24Q3'.Text);

                Blank()

 

And it worked.

 

 

In my edit app I display all submitted items via a gallery. And a lot of items do show a “0”. The default property is just: ThisItem.Name of Column

 

 

My this cause the problem and how can I solve it?

 

Thank you very much!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Jasmin_Sch
Helper IV
Helper IV

I found a solution. I patched the values into my collection (in the onchange property) of every item. And used my collection items (line....) for my sum functions instead of my text inputs....no errors 😉

thank you!

View solution in original post

5 REPLIES 5
Jasmin_Sch
Helper IV
Helper IV

I think I a halfway solution.

To create a collection I set the number columns like LineGJ21:Blank()

instead of LineGJ21:0

 

But it still shows an error with my sum function. Basically I want to sum all items of my gallery which are not blank.

This is my current function:

Sum('Gallery Neues Arbeitspaket Tätigkeit'.AllItems;'Input GJ21Q3')

v-albai-msft
Community Support
Community Support

Hi @Jasmin_Sch ,

What is the error message for your sum function?

Is Input GJ21Q3 in your gallery a Textinput control?

If someone enter a value manually in the gallery for one item, will you update this value into your collection?

 

Per my test, no matter creating a collection using "LineGJ21:Blank()" or "LineGJ21:0",  Sum function both works well.

 

Also, you mentioned in your first reply, that “in your edit app, a lot of items do show “0” inside gallery”. I would suggest you check your first creating new package app, make sure if you have submitted new package successfully. 

 

Please provide your detailed steps so that I can have a test on my side with your steps. It’s better if you can also provide some screenshots.

Best regards,

Allen

@v-albai-msft Thank you!!

To create a collection for my repeating table

 

NewForm('Form Neu');;

ClearCollect(

    Tätigkeiten;ForAll(Sequence(10);

    {

        LineTitelTätigkeit: "Titel Tätigkeit";

        LineProjekttyp: "R&D";

        LinePrio: "Prio 1";

        LineStatus: "Offen";

        LineWunschressource: glbEmptyPerson;

        LineAbteilungWunschressource: "";

        LineAbteilung: "";

        LineGJ21Q1APV:"0";LineGJ21Q2APV:"0";

        LineGJ21Q3APV: "0";

        LineGJ21Q4APV: "0";

        LineGJ22Q1APV: "0";

        LineGJ22Q2APV: "0";

        LineGJ22Q3APV: "0";

        LineGJ22Q4APV: "0";

        LineGJ23Q1APV: "0";

        LineGJ23Q2APV: "0";

        LineGJ23Q3APV: "0";

        LineGJ23Q4APV: "0";

        LineGJ24Q1APV: "0";

        LineGJ24Q2APV: "0";

        LineGJ24Q3APV: "0";

        LineGJ24Q4APV: "0";

        LineGJ25Q1APV: "0";

        LineGJ25Q2APV: "0";

        LineGJ25Q3APV: "0";

        LineGJ25Q4APV: "0";

        LineGJ26Q1APV: "0";

        LineGJ26Q2APV: "0";

        LineGJ26Q3APV: "0";

        LineGJ26Q4APV: "0"     

                

    }

))

Gallery (Items Property: Tätigkeiten) inside a container

+ Button to add rows:

Collect(

    Tätigkeiten;

    ForAll(

        Sequence(2);

        {

            LineTitelTätigkeit: "Titel Tätigkeit";

            LineProjekttyp: "R&D";

            LinePrio: "Prio 1";

            LineStatus: "Offen";

            LineWunschressource: glbEmptyPerson;

            LineAbteilungWunschressource: "";

            LineAbteilung: "";

            LineGJ21Q1APV: "0";

            LineGJ21Q2APV: "0";

            LineGJ21Q3APV: "0";

            LineGJ21Q4APV: "0";

            LineGJ22Q1APV: "0";

            LineGJ22Q2APV: "0";

            LineGJ22Q3APV: "0";

            LineGJ22Q4APV: "0";

            LineGJ23Q1APV: "0";

            LineGJ23Q2APV: "0";

            LineGJ23Q3APV: "0";

            LineGJ23Q4APV: "0";

            LineGJ24Q1APV: "0";

            LineGJ24Q2APV: "0";

            LineGJ24Q3APV: "0";

            LineGJ24Q4APV: "0";

            LineGJ25Q1APV: "0";

            LineGJ25Q2APV: "0";

            LineGJ25Q3APV: "0";

            LineGJ25Q4APV: "0";

            LineGJ26Q1APV: "0";

            LineGJ26Q2APV: "0";

            LineGJ26Q3APV: "0";

            LineGJ26Q4APV: "0"

        }

    )

)

 

Don’t get my wrong. The Sum function works.

But in my app monitoring it shows me erros for each row (LineGJ21Q1APV) I have typed in a number.

It says an empty text can not be converted into a number.

A1F968DF-777B-4D12-B052-2961A574163B.jpegAAAFA585-7C78-444F-8023-D8B25C0A55EC.jpeg1662B42F-04C9-42DC-98CA-D05E08005585.jpeg1048BE1A-DFDD-4E43-9ADE-3DBBF6953473.jpeg3F885558-C4E8-4B7E-9AC3-CE65918C82E6.jpeg

Jasmin_Sch
Helper IV
Helper IV

I found a solution. I patched the values into my collection (in the onchange property) of every item. And used my collection items (line....) for my sum functions instead of my text inputs....no errors 😉

thank you!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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