Duplicate item

BCM
Bronze 3
Bronze 3

I have two fields Month and Year in a Report Table. I want the user to select Month and Year from a Form and to check if the User has already entered same month for same year in Report Table, if so user should be prevented to fill further form.

I also want to apply Valid if condition on Year Field. How is it possible. Kindly help me.

Thanks

Solved Solved
0 5 206
1 ACCEPTED SOLUTION

ISBLANK(
  FILTER("Report TABLE",
    AND([Month] = [_ThisRow].[Month], [Year] = [_ThisRow].[Year])
  ) - [_ThisRow]
)

View solution in original post

5 REPLIES 5

ISBLANK(
  FILTER("Report TABLE",
    AND([Month] = [_ThisRow].[Month], [Year] = [_ThisRow].[Year])
  ) - [_ThisRow]
)

BCM
Bronze 3
Bronze 3

Thank you sir,

This solution resolved duplicate entry but My Users cant Edit the data.

Is there any better solution that can prevent duplicate entry through a Form and allow Edit option to users for the same month Report.

Thanks a lot again.

 

 

Welcome. 

Please explain what do you mean by users cannot edit the form. The Valid if field does not prevent a users from editing a form, it just displays a message and prevents saving of invalid data. Being editable or not is another thing. 

It might help to post screenshots of the behavior you are getting. Thanks.

BCM
Bronze 3
Bronze 3

Thanks for your sincerity and quick response.

I mean to say that the user can fill the form once in a month perfectly with no duplicate entries, but he can't edit the detailed view of the report because the condition on month and year columns also apply there with the same Invalid message "you have already entered your Monthly report....". While the user should have been able to edit his report in case of any correction.

I've set the app formula for month and year columns to auto calculate and select their values, if I simply allow the user to select the values from the dropdown option he may select next month report by mistake or deliberately. 

Can you confirm that you included the underlined portion of the formula:

Markus_Malessa_0-1689106772794.png

That part is supposed to account for the ability to edit the current row still.

Top Labels in this Space