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

[LOOKUP FIELD] SharePoint and Custom Forms PowerApps

Hi,
 
I have one list in SharePoint Online with 9000 rows or more.
 
The native form dont working with the quantity of the rows. So, i created three index in the List and a custom form using PowerApps.
 
In the powerapps in the Field Lookup I added the following logic:

 

SortByColumns( If( IsBlank( DataCardValue2.SearchText ); LISTNAME; Filter( LISTNAME; StartsWith( EMPRESA; DataCardValue2.SearchText ) ) ); "Title"; Ascending )

 

 

With that I can search any row for all list, But when i saved the form the field EMPRESA dont appears (attached image)

 

What am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
h-nagao
Impactful Individual
Impactful Individual

Hi Moises,

 

Thanks for sharing your formula.

I've tested on my side, blow code works fine

 

//For Update property
{ '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id: Value(DataCardValue2.Selected.ID), Value: DataCardValue2.Selected.Title }

and 

 

//For Default property
If(!IsBlank(ThisItem.EMPRESA),LookUp(LISTNAME,ID=ThisItem.EMPRESA.Id))

* depending on your region, comma should  be replaced by semi-colon.

 

I hope these expressions work fine for you.

 

 

 

View solution in original post

6 REPLIES 6
h-nagao
Impactful Individual
Impactful Individual

Hi,
Could you give an expression for Update property of the DataCard?
In general, if you modify items property of combobox inside DataCard, you have to change Update property as well.

Thank you,
Hiro

Hi @h-nagao,

 

Thanks for help me.

 

In DataCard in "Default" is seted "ThisItem.EMPRESA" and in "Update" is seted "DataCardValue2.SelectedItems"

h-nagao
Impactful Individual
Impactful Individual

Hi Moises,

 

Thanks for sharing your formula.

I've tested on my side, blow code works fine

 

//For Update property
{ '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference", Id: Value(DataCardValue2.Selected.ID), Value: DataCardValue2.Selected.Title }

and 

 

//For Default property
If(!IsBlank(ThisItem.EMPRESA),LookUp(LISTNAME,ID=ThisItem.EMPRESA.Id))

* depending on your region, comma should  be replaced by semi-colon.

 

I hope these expressions work fine for you.

 

 

 

View solution in original post

Yeeeeeaah @h-nagao,

 

Thanks so much!!!

 

You are a sacred monster of the PowerApps... Thanks again.

h-nagao
Impactful Individual
Impactful Individual

You are welcome!

Enjoy making PowerApps!

 

Regards,

Hiro

Thank you so much @h-nagao . Your solution saved my day!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,983)