Hi everyone, I have 2 Sharepoint lists, User list and Leaves Details list. In both lists, I have 2 similar columns Name and Number of Days. In the User list it is pre-populated with name and number of days items while in the Leaves Details list, it will be used in the PowerApps to create new records and every time a user creates a new record in the Leaves Details list, the Number of Days in User list should be subtracted from the value key-ed in the new item created in the Leaves Details list. I tried following this method provided by v-chenzi in this link however I do not get the result that I want. There are no errors in my flow but my flow didn't run properly. Attached are images of my flow for reference.



The Number of Days expression is
sub(items('Apply_to_each')?['NumberofDays'],triggerOutputs()?['body/Numberofdays'])
Leaves Details list structure:
User list structure: