0

I want to do this:

  • MANUEL 1
  • PEPE 1
  • MANUEL 2
  • LUIS 1

I want to get the number by a calculated value, but if the name is duplicated get the max(num)+1.

Example:

if (NEW.INPUT) exist 
    find max(num) where (NEW.INPUT)=(STRING IN THE LIST)

Is there a way of doing this?

Thanks. enter image description here

1

In calculated columns we can refer to other columns, but not other rows. A common solution would be to create a master list that had the names and current number. (so each name would only exist once on this list. You could then create a workflow that runs for each new item on the original list that tries to find the item in the master list and increments the number if found, or, adds a new item if not found. The workflow could then update the field in the original list with the current max value for that name.

It's a bit complex to get this working really well, to take things like deletes or name changes into account.

Another option is a code-based event handler, or a custom form with javascript to query the list, find the count of matching items, and update the field on the form.

| improve this answer | |
  • There not't something like an after event of Microsoft aacess but with the list? I tried to create this linking the tables but seems like liked tables can't have events. – Adrianpeces Sep 27 '19 at 7:12
  • That's what workflows and event handlers are: after events. Workflows are created without code using a designer, event handlers are code written using visual studio. – Mike2500 Sep 27 '19 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.