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

Update Leave balance - Leave Request App

Hi, 

I am working on a leave request app, data source is sharepoint. I have two two data source Leave request and BalanceLeave. 

VikasNagaraj_0-1638436268083.png

VikasNagaraj_1-1638436338113.png

In the app on New Request Form i would like to show the user their Current Balance, New Balance, Leave Applied.

VikasNagaraj_2-1638436436745.png

I have a screen My Leave Balance Which is connected to BalanceLeave SP, I do not know how to achieve this, Please help me display Current Balance, New Balance and Leave Applied for logged in user and update the values in My Leave Balance screen. Thank you.

13 REPLIES 13
poweractivate
Community Champion
Community Champion

@VikasNagaraj 


@VikasNagaraj wrote:

 

I have a screen My Leave Balance Which is connected to BalanceLeave SP


A data source is not connected to a Screen. All Screens have access to all data sources.

 


@VikasNagaraj wrote:

update the values in My Leave Balance screen. Thank you.


You would not update the values of a Screen. Instead, from any screen, you can access either data source from any control. 

 

For your scenario, it is either the data source itself (Patch and/or SubmitForm), or even just a Variable (Set) that you might really need to be updating. 

@poweractivate 

What i actually ment was My Leave Balance screen has a gallery, which is displaying information from a sharepoint called BalanceLeave.

VikasNagaraj_0-1638450433372.png

and i want to display Current Balance, New Balance and Leave Applied to users on new request screen. how do i do this ?

VikasNagaraj_1-1638450510412.png

I do not know how to achieve this, also after they submit request, i want to display their new balance on My Leave Balance screen, is there a way to do this? if so please help. Thank you.

@VikasNagaraj From any control on My Leave Balance Screen - (for now you can test it with just a simple Label and the Text property of this Label, for instance) - just do something like this:

 

 

 

YourGallery.Selected.YourColumnName

 

 

 

For YourGallery put your Gallery's name.

For YourColumnName put the name of your column.

 

Check if above helps as a starting point.

@poweractivate 

I tried it and i have this error. 

VikasNagaraj_0-1638451532636.png

 

@VikasNagaraj 

 

Gallery1.Selected.LeaveType.Value

Does above work instead?

@poweractivate 

No, it does not work.

VikasNagaraj_0-1638451759041.png

 

@VikasNagaraj 

 

LeaveType is a Choices field, so 

 

Gallery1.Selected.LeaveType.Value

 

 should be working.

 

1. Are you trying this formula on the Text property of a Label, or on something else?

2. Is there an item selected right now from that Gallery?

3. If you are trying to select it from the other Data Source, you need to make sure the other Data Source has the corresponding Record selected first, such as by a Lookup or some other means.

@poweractivate 

I was using label before as well, I deleted the label, placed it again and it is displaying properly now.

VikasNagaraj_0-1638452205709.png

 

 

@VikasNagaraj 

 

I think it is because the Label you were changing was inside of a Gallery and when you placed it again, you placed it outside of the Gallery - so that might be why you had the issue you were facing before. 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (3,448)