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.

 

 

 

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

Users online (1,464)