cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
CountJuju
Frequent Visitor

Bad Request 400 on page load

Hi

 

Any help would be greatly appreciated.

 

I have a page that when load grabs the defaulted selected items from 2 drop downs and then in the default of some text inputs populates the results from an SPL.

 

Code for default textinput is

If(
    !IsBlankOrError(
        Text(
            LookUp(
                TimeRecords,
                Date = ddWeeks_1.Selected.Value && BillTo.Value = ddBillTo.Selected.Value && Employee.DisplayName = currentUser.FullName
            ).Hours
        )
    ),
    Text(
        LookUp(
            TimeRecords,
            Date = ddWeeks_1.Selected.Value && BillTo.Value = ddBillTo.Selected.Value && Employee.DisplayName = currentUser.FullName
        ).Hours
    )
)

 

However, on initial load I am getting Bad Request 400 messages  

 

"status": 400,
"message": "The expression \"((Date eq ())and(BillTo/Title eq null))and(Employee/Title eq 'fname sname')\" is not valid. Creating query failed.\r\nclientRequestId:
 
I assume it is because it is doing the textinputs before the dropdownlists.
 
Any ideas?
 
Thanks
 
 

 

1 ACCEPTED SOLUTION

Accepted Solutions
gabibalaban
Super User
Super User

Hi @CountJuju ,

 

Can you try this approach:

If(
   IsBlank(ddWeeks_1.Selected.Value) || IsBlank(ddBillTo.Selected.Value),
       "",
      Text(
        LookUp(
            TimeRecords,
            Date = ddWeeks_1.Selected.Value && BillTo.Value = ddBillTo.Selected.Value && Employee.DisplayName = currentUser.FullName
        ).Hours
    )
)

 

Hope it helps !

View solution in original post

2 REPLIES 2
gabibalaban
Super User
Super User

Hi @CountJuju ,

 

Can you try this approach:

If(
   IsBlank(ddWeeks_1.Selected.Value) || IsBlank(ddBillTo.Selected.Value),
       "",
      Text(
        LookUp(
            TimeRecords,
            Date = ddWeeks_1.Selected.Value && BillTo.Value = ddBillTo.Selected.Value && Employee.DisplayName = currentUser.FullName
        ).Hours
    )
)

 

Hope it helps !

View solution in original post

CountJuju
Frequent Visitor

Top Job @gabibalaban - works a treat.  I think I was trying to over complicate it.

 

Many thanks

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and 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.

Users online (1,649)