cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

I honestly have no idea where they come from, I think they are just a label inside of my app somewhere. 

Code looks like this at the moment: 

SortByColumns(
    Search(
        If(
            gblIsAdmin;
            'Manco-Informatie';
            Filter(
                'Manco-Informatie';
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Status = selectedStatus
                )
            )
        );
        TekstZoekVeld.Text;
        "Ordernummer";
        "Verzender";
        "Deelorder";
        "Extern";
        "Product";
        "Intern";
        "Deelorder";
        "Tekeningnummer";
        "Omschrijving";
        "Status"
    );
    "Datum";
    If(
        SortDescending1;
        Ascending;
        Descending
    )
)

@RandyHayes @v-bofeng-msft 

Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

So I basically added the excel sheet as connector and used the exact same code and it worked. (just different table name of course)


This is the code:

SortByColumns(
   Search(
      If(
         gblIsAdmin;
         MancoTabel;
         Filter(
            MancoTabel;
            If(
               selectedStatus = "All";
               Verzender = User().FullName;
               Verzender = User().FullName && 
               (IsBlank(selectedStatus) || Status = selectedStatus)
            )
         )
      );
      TekstZoekVeld.Text;
      "Ordernummer";
      "Verzender";
      "Deelorder";
      "Extern";
      "Product";
      "Intern";
      "Deelorder";
      "Tekeningnummer";
      "Omschrijving";
      "Status"
   );
   "Datum";
   If(
       SortDescending1;
       Ascending;
       Descending
   )
)

 
Basically what I did is: I made sure all the columns are text except the column "datum". I then exported the excel file to SharePoint and added it as a datasource. I then changed the table names and it is still not working.

Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

Anyone able to help? @RandyHayes @v-bofeng-msft 

Highlighted
Microsoft
Microsoft

Re: Getting errors, changed my application from Excel to SharePoint

Hi @TimoMigchielsen :

Is your problem still missing the “status” field?

I think you should check it‘s column names in PowerApps by creating a collection.Can you show it to me in full?

If you cannot locate the problem code,I suggest you check each code snippet by running them separately.

code snippet1:

Filter(
                'Manco-Informatie';
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Status = selectedStatus
                )

code snippet2:

    Search(
        If(
            gblIsAdmin;
            'Manco-Informatie';
            Filter(
                'Manco-Informatie';
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Status = selectedStatus
                )
            )
        );
        TekstZoekVeld.Text;
        "Ordernummer";
        "Verzender";
        "Deelorder";
        "Extern";
        "Product";
        "Intern";
        "Deelorder";
        "Tekeningnummer";
        "Omschrijving";
        "Status"
    )

 

 

Best Regards

Bof

Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

Yes, it is indeed saying that column is not available.

Result of the first snippet (Only says not compatible with big datasources:
https://gyazo.com/ad8c7ba9ca267bf3710fca26a29b3132

Result second snippet:
https://gyazo.com/880772f3c205187a05e6fc7dbaa675a6

Errors are saying this:
https://gyazo.com/7e9231e25643ca39642caf6ef327fe2d

Says the column Status cant be found and that the function search has invalid arguments.

I've made a button and added this code:
ClearCollect(Test3; 'Manco-Informatie')

It's kind of hard to show the result of this but there is no column named "Status" in there. Somehow the name got changed into these 3 (Title, {filenameextended} and {name}:
https://gyazo.com/552c3e74d43200594c91cc26e3eb4fb2
https://gyazo.com/5eefc9f8a866ba251ab09c3c822eb250

Whenever I try to take one of these columns it says I can't find these.

Whenever I open the SharePoint that I am using you can clearly see the Status column is in there.
https://gyazo.com/eb5737005c46d1204a16d2c7d7a2e486
@v-bofeng-msft 

Highlighted
Microsoft
Microsoft

Re: Getting errors, changed my application from Excel to SharePoint

Hi @TimoMigchielsen :

Oddly enough, if you can't find the "status" field as you said, then the first code snippet will fail.

Can you try to use Test3 as the data source in the code and replace "status" with "Title" to retest?

I must say sorry for this I forgot  a ")" at the end of this code snippet.

Filter(
                'Manco-Informatie';
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Status = selectedStatus
                )
)

 

Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

This code now works, it gives me no errors.

 

Filter(
                Test3,
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All",
                    IsBlank(selectedStatus) || Title = selectedStatus
                )
)

 


So after that I copied this code in there:

    Search(
        If(
            gblIsAdmin,
            'Manco-Informatie',
            Filter(
                'Manco-Informatie',
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All",
                    IsBlank(selectedStatus) || Status = selectedStatus
                )
            )
        ),
        TekstZoekVeld.Text
        "Ordernummer";
        "Verzender";
        "Deelorder";
        "Extern";
        "Product";
        "Intern";
        "Deelorder";
        "Tekeningnummer";
        "Omschrijving";
        "Status"
    )


As you can see the data source is still 'Manco-Informatie'. I do not get an error know. I know why it hasn't been working. Because I am on a different pc, I have different language settings. I have used a ; when I should've been using a , 

Could you take a look over the search function and tell me what I should change?

@v-bofeng-msft 

Highlighted
Microsoft
Microsoft

Re: Getting errors, changed my application from Excel to SharePoint

Hi @TimoMigchielsen :

How about this code?

    Search(
        If(
            gblIsAdmin;
            Test3;
            Filter(
                Test3;
                Verzender = VarCurrentUser.FullName && If(
                    selectedStatus <> "All";
                    IsBlank(selectedStatus) || Title = selectedStatus
                )
            )
        );
        TekstZoekVeld.Text;
        "Ordernummer";
        "Verzender";
        "Deelorder";
        "Extern";
        "Product";
        "Intern";
        "Deelorder";
        "Tekeningnummer";
        "Omschrijving";
        "Title"
    )

 

Best Regards,

Bof

Highlighted
Post Prodigy
Post Prodigy

Re: Getting errors, changed my application from Excel to SharePoint

Thank you for your answer.

We replied at the same time, please take a look at my reply 🙂

@v-bofeng-msft 

Highlighted
Microsoft
Microsoft

Re: Getting errors, changed my application from Excel to SharePoint

Hi @TimoMigchielsen :

Maybe you should replace the "status" and try again.What's more I suggest you test these field names one by one.

2.PNG

1.PNG

Best Regards,

Bof

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

Top Solution Authors
Top Kudoed Authors
Users online (8,248)