Showing results for 
Search instead for 
Did you mean: 
Super User
Super User

Accessing current list item data in the OnVisible event of a SharePoint custom list form

I have created a custom form for a SharePoint list that lets the user enter a ZIP code in a field and then (through a Flow which calls a webservice) shows only the cities for that zip code in a dropdown list.


When I edit an existing item in my SharePoint list, in the custom form I need to access the item's ZIP code value in order to preload my dropdown list with the cities. So I tried these different techniques in the OnVisible event but none would work:




Each of these variables (DataCardValue5 is the data card containing the ZIP code) is displayed in a label on the list's form but they're empty except for the last one which always returns the city of the first item in the list (of course).


How can I access my current list item's data in the OnVisible event of the form ?

Community Support
Community Support

Hi @R3dKap,


Could you please share a bit more about your SP list?


If you want to access your current list item data within the OnVisible property of the Integration FormScreen1, please take a try with the following formula:


I assume there is a column called ZIP_code to store the ZIP code within your SP list, I have made a test on my side, please take a try with the following workaround:4.JPG




Set the Text property of the Label control to following formula:


Note: You should reference above formula within your app directly rather than initialize a global variable (Using Set function) to store the value. I have made a test on my side, if you initialize a global variable to store the value the above formula returns, the global variable would return empty.


Then save and publish your app, test it within your SP list.


The GIF image as below:Test1.gif





Best regards,




Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-xida-msft,


Thanks for your example... In fact, my problem is elsewhere (or maybe I didn't explain it well enough).


As you can see in your GIF, when you select the first list item, once the form is displayed, the field and the label "ZIP Code" shows immediately 224000.

But when you select the 2nd item and click EDIT, the form pops-up but the field and the label show the value of the previous item (224000) for 1s and then it shows the value of the selected item (225600).

Same happens when you swith to the 3rd item: 225600 is shown for 1s and then 224100 is shown.


This latency is a real problem because when the OnVisible event of the screen is triggered, the SharePointIntegration.Selected.ZIPCode still has the value of the previous item (not the real selected one).

Same with the OnEdit event of the SharePointIntegration object.


Is there any way to trigger or do anything only when the "real good" data has been loaded ?

Helpful resources

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 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 (1,271)