web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The specified column i...
Power Apps
Answered

The specified column is not accessible in this context

(0) ShareShare
ReportReport
Posted on by

Hi all, 

 

Bit of a strange one today. I have two dataverse tables; SupplierInvoiceHeader and SupplierInvoiceLines.

SupplierInvoiceLines has a Many-to-one relationship to SupplierInvoiceHeader and the lookup works when checking the data in dataverse directly.

 

However, when I start building a collect statement to build a collection for the gallery I get the error 'the specified column is not available in this context' before I start adding columns to filter (see attached screenshot).

 

I have tried removing and re-adding the tables, and restarting the PA editor but it keeps coming back. Any ideas?

PA_error.png
Categories:
I have the same question (0)
  • v-mengmli-msft Profile Picture
    Microsoft Employee on at

    Hi @kdavies1966 ,

     

    Could you please show the full formula? Including types of columns.

    It would be better to explain what you are using this formula for.

     

    Best regards,

    Rimmon

  • Verified answer
    kdavies1966 Profile Picture
    on at

    Hi Rimmon,

     

    Thanks for the quick reply!

    The code was to select all of the lines for the headers that had previously been selected, and I was attempting to build the following statement;

     

    ForAll(RenameColumns(collAppHdr, "crf5f_sihidkey", "hID"),

    Collect(collApprovals, Filter(SupplierInvoiceLines, SupplierInvoiceHeader.SIHIDKey="hID))

     

    with the intention of then adding columns to bring in some additional values from the related header record.

     

    However, I decided to changetack and removed the ForAll around the collect and I was able to successfully use the following code;

     

    ClearCollect(collApprovals, AddColumns(Filter(SupplierInvoiceLines, SupplierInvoiceHeader.SIHIDKey in Distinct(collAppHDR, SIHIDKey)), "INVDisplayNotes", "N",
    "INVDeliveryContact", Project.PRAssignedto,
    "INVSalesContact", Project.PRSalesContact,
    "SIHReference", SupplierInvoiceHeader.SIHReference,
    "SIHPayTech", SupplierInvoiceHeader.BKPartner.TDSearchCode,
    "SIHStatus", SupplierInvoiceHeader.SIHStatus,
    "SIHDescription", SupplierInvoiceHeader.SIHDescription,
    "PO_IDs", PurchaseOrder.POIDKey));

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 413

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
timl Profile Picture

timl 315 Super User 2026 Season 1

Last 30 days Overall leaderboard