I am facing some issues with the sum function within in my gallery.
For the background:
I create a collection with lines which should be patched with number columns in sharepoint afterword.
'Gallery Neues Arbeitspaket Tätigkeit'.AllItems;
'3400 ILLU Arbeitspakete O3.4';
Defaults('3400 ILLU Arbeitspakete O3.4');
GJ21Q1APV: Value('Input GJ21Q1'.Text);
GJ21Q2APV: Value('Input GJ21Q2'.Text);
GJ21Q3APV: Value('Input GJ21Q3'.Text);
GJ21Q4APV: Value('Input GJ21Q4'.Text)}))
The inputs inside my gallery (data source is my collection “Tätigkeiten”) are Text inputs.
But I want to sum them. So I put text inputs inside my gallery with default property Sum('Input GJ21Q1';'Input GJ21Q2').
But after I have run the app and review its performance it says errors: This value can not be converted into a number because value consists of empty string.
I tried a lot of things like changing from text input to number input. I changed the clear collect function to this:
But nothing works to avoid these errors.
Please help me with this!
Thank you very much
I think converting the textinputs into numbers within your sum function should work.
Does this work for you? :
Sum( Value( 'Input GJ21Q1'.Text); Value( 'Input GJ21Q2'.Text))
Also, if these labels are inside a gallery you would have to use: ThisItem. 'Input GJ21Q1'.Text
Thank you @_Nils_
no it does not work
Just for summary
this my function to create a collection
text inputs with default ThisItem.LineGJ21Q1
The summary Input is also a text Input but it does not make a difference if I change it to number.
Could you give some more information about what you are trying to accomplish and when the error occurs exactly?
As far as I understand, you are creating a collection "Tätigkeiten" which is displayed in a gallery.
In this gallery you have textinputs showing the values of each column (using ThisItem.* as default) as well as a textinput which is suppost to sum all the values from the collection for each line (using Sum(ThisItem.*; ThisItem.*)).
Is this correct? When does the error occur exactly? Could you share a screenshot and brief description?
unfortunately I cannot reproduce this error as it just works for me.
So I can only suggest the classic close and restart Powerapps or maybe try renaming the collection and see if it was just some internal thing.
Otherwise I don't really have any ideas
Learn how to create your own user groups today!
Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!
Check out the new Power Platform Community Connections gallery!