cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
StevePenner
Helper I
Helper I

Why Isn't a Data Source Always A Data Source In App Building?

I have attached 4 images (captioned as 'IMAGE 1', 'IMAGE 2', etc)  in this post to illustrate something and I am not sure why this is so.

 

My app is connected to a SharePoint list named 'CAB Agenda Admin'. It basically has one column (internal name 'Title', display name something else).

 

IMAGE 1 shows a that a List Box has its Items property (circled green) set to the SP list column.  When I put the cursor in the formula bar within the name of the list (red circle) to see the app builder connecting with the SP list data, I see what I expect (blue rounded rectangle).

IMAGE 2 shows that same List Box (Items property circled green) but the cursor is now inserted in the column name of the formula bar (circled red), and now I see what I expect (blue rounded rectangle), which is only the table of data corresponding to the column

 

IMAGE 3 shows that same List Box (Items property circled green) with the cursor in the formula bar back within the SP list name (red circle on right) but now I have enclosed it in a ClearCollect() function. Sure, it produces an error as it should, but the connection to the SharePoint list data is still there (blue rounded rectangle).

 

IMAGE 4 shows me selecting the screen now, and putting the formula (circled red) with the cursor in the SharePoint list name, and into the OnVisible property (circled green) of the screen. The result now: the connection with the data source is gone.

 

The app builder says there is no data to show. (I could take the list name and its dot-connected column name out of the ClearCollect() function and it would be the same.

 

It seems to me that I ought to be able to create a collection with the OnVisible property, and that the data source should at any rate maintain its connection to the app, even if there is an error in the formula and also if the error is related to a valid formula nonetheless being set to a property that does not accept the return type of the outermost function.

 

So why not?

 

IMAGE 1IMAGE 1IMAGE 2IMAGE 2IMAGE 3IMAGE 3IMAGE 4IMAGE 4

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@StevePenner 

The difference is behavioral and non-behavioral!

The formula editor only expands tables on non-behavioral formulas (i.e. Items, etc.).  It does not expand them on Behavioral actions (OnVisible, OnSelect, etc.)

It's perhaps not all that consistent, but has been that way for a while that I can remember.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

1 REPLY 1
RandyHayes
Super User
Super User

@StevePenner 

The difference is behavioral and non-behavioral!

The formula editor only expands tables on non-behavioral formulas (i.e. Items, etc.).  It does not expand them on Behavioral actions (OnVisible, OnSelect, etc.)

It's perhaps not all that consistent, but has been that way for a while that I can remember.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,653)