Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Delegation, raises a few questions

(0) ShareShare
ReportReport
Posted on by 291

Alright, I understand delegation can be a problem, and I think I understand why.

 

My issue is understanding best practices to avoid delegation issues.

 

My current situation is I have a Company (Accounts in the CDM) table, which has related records in a Sites table, which has related records in a SiteAddress table.

 

I would use a tree control, but as we don't have the control, I decided to use tablists.

 

First tablist shows companies, then the company sites in another tablist, and finally the Site addresses in the last tablist. (on this I would take suggestions, I do like the appearance of handling it this way, but I'm not married to it.)

 

SiteAddresses will cause a delegation issue due to the number of records. Right now it's less than the limit but it won't stay that way.

 

This code works (less the delegation issue):

 

DELEGATION TABLIST1 2023-10-30 08_38_32-Power Apps.png

I tried using AsType, but it is nothing but issues that I just don't see the issue based on examples I've found. We have Bing chat which does an OK job suggesting things and I can generally sort through. That suggested using AsType.

 

So, I'm looking for suggestions on how to avoid delegation issues. I considered just creating a collection locally, but that seems like a bad idea, so I'd rather do it properly.

 

When I try to use AsType I get a plethora of errors that I'm just not understanding, I've never used AsType, but it looks pretty straightforward.

 

Here is that disaster formula I can't sort out:

 

DELEGATION TABLIST3 2023-10-30 08_38_32-Power Apps.png

 

DELEGATION TABLIST2 2023-10-30 08_38_32-Power Apps.png

I am working on this myself, but I am not optimistic.

 

Another question I have is around the GUID comparison. I've run into this one a couple of times (issues trying to compare GUIDs) and gotten through it, but not really clear why I even have the issues at all.

 

The field 'ParentID' is a text field in the table Sites that stores the GUID of the record in the table Accounts the Sites record relates to. In Accounts the field is 'Account' or 'AccountID' This is the Account table in the CDM.

 

On this issue am I doing this wrong? I get errors requiring me to convert both to text (my solution), which is why I have the delegation issue in the first place, I think. Am I correct that if I could just make the comparison GUID to GUID and NOT use TEXT I wouldn't have a delegation issue? Am I doing something wrong... why can't I just compare GUID to GUID? Should I be handling the relation some other way?

 

The datasets are small enough right now I can adjust the approach now if I am doing this wrong.

  • Verified answer
    STS1SS Profile Picture
    291 on at
    Re: Delegation, raises a few questions

    OK... I guess I am a bit confused on how dataverse? handles GUID. I've run into some trouble trying to use them. It just made sense to me that I would use the GUID for a record to relate it over to another record.

     

    I've had type issues which led to delegation issues etc.

     

    I ended up stumbling across something, can't remember what now, that made me think we should be using some other column. Well, I have an auto-number field in every record in my tables as we import these tables from an old access app. So I just use those number and bammo, problem solved...

     

    But if your advanced and see this I'd love to gain some understanding of what we are supposed to do with GUID fields... EG: why can't I add a GUID field to a view?

     

    Anyway, thanks for looking.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard