Hi
I have 2 main tables in a dataverse. In table Components table I store my equipment. In table Transactions i register what was done with that equipment.
I have a custom page model driven app where i select a Project name and it lists me in a gallery all equipment that is associated with this Project. Then i select with check boxes gallery items and select a certain task to be done for that equipment lets say Painting.
When i hit Submit button it patches a records of selected gallery items in Transactions table and also patches this specific task as Painting for each record.
I want to make some security so that user does not register same item twice for same task. For example if user selects some items in a gallery and selects task to be registered(or vice versa) the gallery checkbox is unselected and disabled or gallery items changes color to red or gallery items just do not load if record already exist. Anything would help for beginning
Can you please suggest how to do that?
Why don't you do a LookUp?
Imagine that the field that stays the same and sets the connection is the id.
You can do something like:
If( IsEmpty(LookUp(DataSource, TaskID = ThisItem.TaskID)), PATCH, Notify("Task already submitted"))
Something like that
If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!
Best regards,
Gonçalo Nogueira
Check my LinkedIn!
Check my User Group (pt-PT)!
Last Post on Community
My website!
OK. I want to check if it works so i created a label in gallery and put formula for simple checking
If(IsEmpty(LookUp(transactions,'equipment lookup'=ThisItem.name)),"Not present","Present")
But i get error: incompatable types of comparison. These types can't be compared: Record, Guid
'equipment lookup' is a lookup field name in trasnactions table and name is a name of that equipment in equipment table
If(IsEmpty(LookUp(transactions,'equipment lookup'.name=ThisItem.name)),"Not present","Present")
And like that?
it returns that all are present thow i have entered only 1 item into transactions table
If LookUp is empty it should say that it is not present because you did not find anythin.g So, try this:
If(IsEmpty(LookUp(transactions,'equipment lookup'.name=ThisItem.name)),"present","Not Present")
If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!
Best regards,
Gonçalo Nogueira
Check my LinkedIn!
Check my User Group (pt-PT)!
Last Post on Community
My website!
it says now not present for both records thow 1 record should be marked as present
Are you sure that the lookup is correct?
You can try with IsBlank instead of IsEmpty
If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!
Best regards,
Gonçalo Nogueira
Check my LinkedIn!
Check my User Group (pt-PT)!
Last Post on Community
My website!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
185 | |
53 | |
41 | |
36 | |
30 |
User | Count |
---|---|
241 | |
74 | |
71 | |
69 | |
65 |