Link databes replaces entity?

Hi, Not sure what I’m doing wrong…and I hope I can explain it.. :wink:

I have a “Project DB” and a “Line items DB”, when I create an Invoice in “Invoice DB” I do it with a button, but sometimes I have to add several Projects to the prepared invoice.

I tried a Rule that links the “line items” from the projects, when the Invoice relation is added, to Invoice DB (which is one to many One Project /One Invoice - Many Line Items).

Now, it works, but the rule is replacing the already linked “Line item”, how do I do it so that stays, so that it does modify what’s already there?

Hi Eva,

This may have something to do with the filters of your rule.

Would you like to have a look into this together?

Michael

PS: Did you try to ask your question to Fibery AI? :slight_smile:

Ai did not work, basically told me to do what I was doing. This is my rule in my Invoices DB:

  1. Please help me better understand your terminology.

Initially I thought when you say “Line Items” you mean those line items that are on the invoice. What are those line items you actually mean, what’s their role?

Some real world example would help.

  1. Is this how it is in your current data model?

Invoice can have 1 or many Projects

Invoice can have 1 or many Line Items

Project can have 1 or many Line Items

Yes, it looks like this! Line items is a DB, they are the line items in the invoice, but I already create them when I do a quotation.

When you use the Link Line Items action it should not unlink existing Line items that are already linked.
If they are getting unlinked, you may want to check out the activity log for the Invoice to see what is going on.

You mean the log from the rule? It says it works, but it just unlinks the last line item. If I do it manually, without a rule, just adding the Invoice relation to the line items it works, but I don’t manage with the rule.

I don’t see that the rule is unlinking anything.

I meant that you should check the activity log for the entity itself.

ah ok! thanks for your patience.

Indeed, it seems to unlink the last line item.

Thanks.
Can you share a screenshot of the rule (as it currently is) and a screenshot of the activity log with the action details fully expanded.
Thx

this is the rule.

And you mean this activity from the rule? :

Yes, assuming that’s showing the whole rule, and yes, but please expand all levels (for at least one of the runs)

I can’t reproduce this.
Are there any other rules that would affect the Invoice db?