Salesforce Fact #924 | Updating multi select lookup using screen action

Suppose we have a datatable and multiselect lookup in screen flow. Now, whatever records are selected in the datatable should get selected in the lookup component. For this, we can make use of screen action. We can create a subflow which would take the list of selected records and extract the ids using a transform element and return those to the main flow. The returned ids can be selected as the input of the lookup. This would work instantly. In this example, we have an account lookup which is updated with the selected records of the datatable. Attached are the screenshots.