Getting my head around addmodifyrows

I am having an issue understanding where my problem is.

I have 2 tables

Client Keywords which contains the fields Client (text), Keyword (test), Active (boolean) and ID (a computed field that is the field client and the field keyword concatenated).

Client Keyword Status which contains the field ID (that I want to populate with ID from the table Client Keywords) and a few other fields not of consequence.

On my page I have a select dropdown of clients and button. When the user clicks the button I want to populate the 2nd table (Client Keyword Status) with the records from the table Client Keywords if the field Client matches the name selected in the dropdown, and if the record in the table Client Keywords has the field Active = true.

It seems no matter what I try the code tries to add everything in Client Keywords to a single record in Client Keywords Status. Do I need to use a different command to insert a record in Client Keyword Status for each record in Client Keywords that matches the criteria?

Many thanks in advance!

1 Like

I was finally able to solve this.

For anyone else that may have something similar this is the code I used:

RunActions(
[Client Keywords]
.Filter(client = selClient AND active = true)
.FormulaMap(
AddRow(
[Client Keyword Status],
[Client Keyword Status].ID, CurrentValue.ID,
[Client Keyword Status].Date, Today()
)
)
)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.