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.
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.
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

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (1,045)