web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Store data into Collec...
Power Apps
Unanswered

Store data into Collection, gallery and Send Email based on selected combo box

(1) ShareShare
ReportReport
Posted on by 2

Hi,
I have encountered some issues regarding building an apps in power apps.
1) In my screen there are a form viewer and editable excel-like gallery. On my App screen, here is my code
OnStart: 

 

ClearCollect(MyCollection, { Item: 1, Description: "", 'Supplier Item No (SIN)': "", UoM: "", 'Day QTY':"", Currency: "", 'Total QTY': "", 'Unit Price (USD)': "", 'Discount Rate (If Any)' : 0, Total: 0}

);

ClearCollect(colSubTotal, {Items:1,TotaL:0});

Set(resetComboBox, false);

Set(resetComboBox, true);

Set(resetAll, false);

Set(resetAll, true);

 

 

However, all the items inserted in the gallery does not store in the collection.

 

shara13_0-1720662043085.png

2) There is a label text of Grand Total. When I add item, the label function normally but whenever I delete an item, the grand total return 0. Since in Total text I put the calculation code, so I create a new collection name (colSubTotal) to store only the Value of total for each item. Below is the code for delete button: However as I said on 1) MyCollection does not store anything so it cannot patch anything.

 

Remove(MyCollection, ThisItem);

Clear(colSubTotal);

ForAll(MyCollection, Collect(colSubTotal, {TotaL: Total}));

UpdateContext({GrandTotal:Sum(colSubTotal, TotaL)});

 

3) How to store form viewer and the editable excel-like gallery in one sharepoint? Since my collection does not store anything, hence I cannot continue store data into my sharepoint. Plus, the form viewer does not recognized the item either I used the column name or field name.


4) I wanted to send email based on selected email in combo box. In my combo box I connect with an excel file that has 2 columns (Name and Email). I display both on the combo box. When I try to run the apps, and choose only one email, I got error prompt "Error when trying to retrieve data from from the network: Expression "Email eq null" is not supported. Below is the code that I used: When I insert ThisItem.Item i got red underline as it does not recognized it.

 

Launch("mailto:" & cbEmail_1.Selected.Email &

 "?subject=Approval for MSRF Form" &

 "&body=" &

 Concat(

 Filter(Gallery4_11.AllItems,IsEdited),

 Concatenate("Item:",ThisItem.Item, "Description:",Description, "Supplier Item No (SIN):",'Supplier Item No (SIN)',

 "UoM:",UoM, "Day QTY:", 'Day QTY', "Currency:", Currency, "Unit Price (USD):", 'Unit Price (USD)',

 "Discount Rate (If Any):", 'Discount Rate (If Any)', "Total QTY:", 'Total QTY', "Total:", TotaL, Char(100)

 ))

)

 

 

 

 

Hope anyone can help me with my problems. Appreciate it and thank you.

 

Categories:
I have the same question (0)
  • shara13 Profile Picture
    2 on at

    Update:
    I have solved problem no 4). Below is the updated code that solved my problem:

    // Extract the email address from the selected item
    Set(
     extractedEmail,
     Mid(
     cbEmail_1.Selected.Email,
     Find("<", cbEmail_1.Selected.Email) + 1,
     Find(">", cbEmail_1.Selected.Email) - Find("<", cbEmail_1.Selected.Email) - 1
     )
    );
     
    // Send the email using the extracted email address
    Office365Outlook.SendEmailV2(
     extractedEmail,
     "Approval for MSRF Form",
     "Please find the attached MSRF form below."
    )

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 405 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 280 Super User 2025 Season 2

#3
Kalathiya Profile Picture

Kalathiya 272

Last 30 days Overall leaderboard