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

I settled a dropdown to show the name attribute of a SharePoint list relationship instead of the ID but now It does not save the relationship

Hello everybody,

 

I am making a PowerApp using SharePoint list that has relation ship between them. In this scenario there are two elements with this relation:

Oportunidad N : 1 Cuenta

For so in the Oportunidad list there will be many elements that can have the same "Cuenta" as variable value for the relationship attribute.

 

The default controller for the relationship with Cuenta showed the IDs of the relationship but that element has a property 'Name'. I want to be displayed the names to better identify the elements. I finally achived that but now if I change the value It doesn't store the new relationship value.

 

These are the value for data  the DataCardValue

AlexBlanes_0-1629989444144.jpeg

These are the values of the parent DataCard

AlexBlanes_2-1629989520519.jpeg

 

This succesfully shows the names

AlexBlanes_3-1629989564795.png

 

 

 

Using the PowerApp monitor I can filter the request in charge of making the update and I watch this:

AlexBlanes_4-1629989765161.png

There is an empty id where It should be the new Id I guess.

 

I thing It has to be something related to the Update  of the DataCard. It should have something like this:

AlexBlanes_5-1629990668577.png

But the error says : Record Expected

 

Thanks in advance,

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@AlexBlanes 

You need to provide a record for your lookup column in the Update property.

Change your Update property to the following:

With(DataCardValue26.Selected,
   {Id: ID,
    Value: Name
   }
)

This assumes that Name is the column from your CuentaTest list that you are using in the relationship of the lookup.  If not, change accordingly.

 

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

@AlexBlanes 

You need to provide a record for your lookup column in the Update property.

Change your Update property to the following:

With(DataCardValue26.Selected,
   {Id: ID,
    Value: Name
   }
)

This assumes that Name is the column from your CuentaTest list that you are using in the relationship of the lookup.  If not, change accordingly.

 

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 (2,981)