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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to Insert Formula ...
Power Apps
Unanswered

How to Insert Formula in Gallery Inline Editing

(0) ShareShare
ReportReport
Posted on by 2

Hi, I am developing my 1st apps where it basically quite similar to purchase order concept where it consisted of PO header and several line items. The line items are created using repeating table from collection where some entries are manual and few are formulated (eg lookup formula, multiply, sum up). The newly created record are saved into SP using patch formula. 

 

The challenges that I am having now is when I add a gallery to edit the line items. The gallery records are from SP and when changes are made against the records, how can I activate the formula (eg lookup formula, multiply, sum up)? Rather than allowing the record mapped from SP, I would like to see the new entries or changes made by user can be formulated when edit button is clicked.

 

Below is the snapshot from the Edit Screen.

 

JJCHAN_0-1692080340855.png

Currency - Dropdown selection which made by User

Acc. Rate - lookup formula from another SP when currency drop down is selected by User 

Amount - Multiply formula (Qty x Unit price)

Amount USD - Multiply formula (Amount x Acc. Rate)

 

Hope to have guidance from expert here. Thanks.

Categories:
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @JJCHAN ,

     

    Can you tell me the data type of these values in your SP? I assume they are all text, and in the Gallery you use the Label control to display them.

     

    If you want to find the value of 'Acc. Rate' in SP based on the value selected in DropDown, you can set the Text of label to:

    LookUp(SP,Currency=Dropdown1.Selected.Value,'Acc. Rate')

    vmengmlimsft_0-1692169396324.png

    For the label of 'Amount':

    ThisItem.Qty*ThisItem.'Unit Price'

    For the label of 'Amount USD':

    ThisItem.Amount*ThisItem.'Acc. Rate'

     

    I hope you found this helpful.

     

    Best regards,

    Rimmon Li

  • JJCHAN Profile Picture
    2 on at

    Hi Rimmon, my SP consisted of text and numbers.  I managed to insert the formula as outlined by you during the item creation. It was created via repeating table method, captured under collection list and patch into SP.  However, once the item is saved into SP, how can we do the editing while maintaining the formula? Example, if I were to change the qty or unit price, I would like the formula to take over the calculation on the Amount and USD conversion. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard