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

Condition to Notify if it already exists - error: Invalid argument type

I have a form: EditForm1

The main question is for the end user to supply a ProjectID

 

If that ProjectID already exists in the entity, Id like the end user to receive a warning that it already exists.

 

This is what I have so far, however I'm getting an error on the first equal sign that says "Invalid argument type":

 

 

If(!IsBlank(LookUp(ProjEmergencies, ProjectID = ComboBox3.SelectedItems.Result))=false, Notify("That Project already exists",Warning), SubmitForm(EditForm1);Navigate(BrowseScreen1,ScreenTransition.Fade))

 

 

The data is being put into an entity on the common data service.

 

what am I doing wrong?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Condition to Notify if it already exists - error: Invalid argument type

If(CountRows(Filter(ProjEmergencies,ProjectID=ComboBox3.Selected.Result )) > 0,
Notify("That Project already exists",Warning), SubmitForm(EditForm1);Navigate(BrowseScreen1,ScreenTransition.Fade))

View solution in original post

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Condition to Notify if it already exists - error: Invalid argument type

If(CountRows(Filter(ProjEmergencies,ProjectID=ComboBox3.Selected.Result )) > 0,
Notify("That Project already exists",Warning), SubmitForm(EditForm1);Navigate(BrowseScreen1,ScreenTransition.Fade))

View solution in original post

Highlighted
Super User II
Super User II

Re: Condition to Notify if it already exists - error: Invalid argument type

I think this may have something to do with the CDS columns need to be in a certain state, some setting in PowerApps I think? 

 

@PowerAddict 

Highlighted
Super User III
Super User III

Re: Condition to Notify if it already exists - error: Invalid argument type

Hi @TesDA ,

Try

If(
   IsBlank(
      LookUp(
         ProjEmergencies,
         ProjectID = ComboBox3.SelectedItems.Result
      )
   ),
   SubmitForm(EditForm1);
   Navigate(BrowseScreen1,ScreenTransition.Fade),
   Notify("That Project already exists",Warning)
)

I also got rid of the Not argument which is not delegable.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Highlighted
Super User III
Super User III

Re: Condition to Notify if it already exists - error: Invalid argument type

Hi @TesDA ,

You have marked your original post as the Solution - is this what you intended to do?

Highlighted
Helper V
Helper V

Re: Condition to Notify if it already exists - error: Invalid argument type

That doesn't appear to be the case. I have marked the solution from another user I implemented first that worked.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,787)