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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / The URI segment $ref i...
Power Apps
Unanswered

The URI segment $ref is invalid after the segment

(0) ShareShare
ReportReport
Posted on by 219

Hey,

 

I've got awkward error. Maybe some of you experienced it already or at least could tell me what it means.

 

The requested operation is invalid. Server Response: The URI segment '$ref is invalid after the segment <entity relationship name>

 

So, I launched my app successfully for users but at some point in time app users started to report a problem that images taken in the app stop save in database (CDS).

After quick debug session I've discovered that below error appeares after executing Relate function that should create relationship between image record and TestCompound entity (there is N:1 relationship, multiple photos to 1 test compound record).

 

bug.png

 

Anyone knows why it's happening?

Categories:
I have the same question (0)
  • v-xida-msft Profile Picture
    on at

    Hi @Mike_Guzowski ,

    Based on the error message that you mentioned, I think there is something wrong with the formula you provided.

     

    The first argument of the Relate function is required to provide a Related table of a specific Entity record rather than the whole Entity.

     

    I assume that you want to relate the image record to the first record of your TestCompound entity, please consider modify your formula as below:

    Relate(
      First(testedCompound).'Test Dashboard Photos', /* <-- Type the RelatedTable of a specific record of your Entity */
     Patch('Test Dashboard Photos', Defaults('Test Dashboard Photos'), {cr675_name: GUID(), entityimage: camCamera.Stream})
    )

    Please consider take a try with above solution, check if the issue is solved.

    You may also need to type the following formula:

    Relate(
      LookUp(testedCompound, FilteredColumn = "A specific value").'Test Dashboard Photos', /* <-- Type the RelatedTable of a specific record of your Entity */
     Patch('Test Dashboard Photos', Defaults('Test Dashboard Photos'), {cr675_name: GUID(), entityimage: camCamera.Stream})
    )

     

    More details about the Relate function in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-relate-unrelate

     

    Best regards,

  • Mike_Guzowski Profile Picture
    219 on at

    Hey @v-xida-msft 

    Thanks for your answer. I wasn't precise enough - TestCompound is the entity but testedCompound is a selected specific record of that entity. So the gallery of test compounds contains Items definition of:

    LookUp('Test Details', Id=selectedTest.Id).'Test Compounds'

    And on item select there is a function call: Set(testedCompound,ThisItem);

    So in other words the error persist even though I've provided in the first argument of the Relate function a Related table of a specific Entity record (not the whole Entity).


    Moreover my relation works in a new app and worked in current app previously but at some point in time just it stopped work anymore.

    Any clue why this error happened? What does $ref mean?

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard