cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RoScha
Helper V
Helper V

Find a record

Hello community,

can you please help me again, because I just don't know what I'm doing wrong here.

I have this SharePoint list...

RoScha_0-1606776084134.png

and I would like to search for a number in the column "FZ_ID_KD" and then display all relevant records in a gallery.

And this gallery has this formula...

 
 

Anmerkung 2020-11-30 234501.jpg

 

But no data record is found here although 4 data records have to be displayed.

What am I doing wrong again?

Thank you for the help.

 

Best regards

RoScha

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User
Super User

@RoScha 

This happens all the time with column names.  Once you create a column, it will retain that name from then on.  If you rename it, SharePoint will "honor" the new name, but it is still the original column name underneath (and will be seen in that URL).

This is one reason I tell people to ALWAYS name your columns originally with NO spaces in them.  You can go back through and put the spaces in after that to make it more readable.

But, if you create a column called Account Number it will forever be known as Account_x0020_Number.

AND, you will then have to reference it as such which is a pain.  If you name it AccountNumber and then change it to Account Number, it will forever be known as AccountNumber, much easier to work with in design.

As well, if you name your column AccountNumber and then change it to NumberForAccount it will still be known in SharePoint as AccountNumber.

 

Luckily PowerApps has been changed a couple years back to "honor" the "honored" name from SharePoint rather than the actual name, but I find that is not honored in all places. 

 

I hope that provides more detail for you on the reason why you might see what you are seeing.

_____________________________________________________________________________________
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

7 REPLIES 7
RandyHayes
Super User
Super User

@RoScha 

The search function will only search against Text columns in your list.  It appears that you have a numeric.

If you will always be looking for a number in that column, then change your formula to the following:

Filter(P00001_FZ, FZ_ID_KD = Value(txt_hiden_kdnr.Text))

 

If you want to search that and other columns as text, then change to the following:

Search(
    AddColumns(P00001_FZ, "txtFZ_ID_KD", FZ_ID_KD),
    txt_hiden_kdnr.Text, "txtFZ_ID_KD"
)

 

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!

Hello @RandyHayes 

 

I don't know why, but your two formulas don't work. Especially since I also noticed another problem.

If I start typing a formula in the bar at the top, suggestions will be made underneath. If I now start to enter the "FZ_ID_KD" column, nothing is suggested to me. It seems to me that PowerApps cannot find the column.

But I do not know why.

 

Do you have any idea what could be the problem here?

Now that totally confuses me.

In the app, the column (ID_KD) in SharePoint is called "FZ_ID_KD".

 

RoScha_0-1606942748898.png

 

RoScha_1-1606942900718.png

How can that happen? Can anyone explain this to me?

 

And if I now make FZ_ID_KD ==> ID_KD in the formula, then the formula also works

RandyHayes
Super User
Super User

@RoScha 

Yes, you will need to make sure that the names of your real columns are used in the formulas I provided.

If you are in doubt as to the real name of the column, go into the SharePoint List Settings and then click on the column in the list of settings.  Look at the URL in the browser, at the end will be the real name of the column.

_____________________________________________________________________________________
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!

@RandyHayes 

Thanks for this tip too, but I still don't understand how this misnomer happened. But so, I'll find out at some point how this mistake could happen.

 

Best regards RoScha

RandyHayes
Super User
Super User

@RoScha 

This happens all the time with column names.  Once you create a column, it will retain that name from then on.  If you rename it, SharePoint will "honor" the new name, but it is still the original column name underneath (and will be seen in that URL).

This is one reason I tell people to ALWAYS name your columns originally with NO spaces in them.  You can go back through and put the spaces in after that to make it more readable.

But, if you create a column called Account Number it will forever be known as Account_x0020_Number.

AND, you will then have to reference it as such which is a pain.  If you name it AccountNumber and then change it to Account Number, it will forever be known as AccountNumber, much easier to work with in design.

As well, if you name your column AccountNumber and then change it to NumberForAccount it will still be known in SharePoint as AccountNumber.

 

Luckily PowerApps has been changed a couple years back to "honor" the "honored" name from SharePoint rather than the actual name, but I find that is not honored in all places. 

 

I hope that provides more detail for you on the reason why you might see what you are seeing.

_____________________________________________________________________________________
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!

Well, that's completely new to me.
It's good that I understood that now. Thank you @RandyHayes 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,059)