I have my SQL Connector connected to populate a SharePoint online list. Same columns live in both SQL and Sharepoint. All of the other columns populate except the email address.
I have tried several times and it just wont fill the field. Any suggestions.
I am trying to keep the SQL DB which is the record of truth synced with SharePoint so when a change is done in SQL it automatically updates SharePoint, I havent quite figured out how to do that piece, but the one I am using is triggered when a new item is added to SharePoint, it works but not the process I want to have it initiate. I was using this flow to prepopulate the data the first time. That is how I discovered that my emails are not populating.
Hi @Ruenells ,
From your description, it looks like you want to update SharePoint list when a change is done in SQL table.
However, if you are using SQL On-premises, it is not possible to trigger the flow when a change is made on a SQL table.
Please check the following doc:
Besides, about the Email Address field, is it a multiple selections enabled person or group column?
I assume that there would be multiple email addresses filed in the Email field in SQL table. what’s the format? Will it be something like “firstname.lastname@example.org;email@example.com”
If so, please check if the following workaround will be a reference for you.
Manually trigger the flow.
Initialize 4 string variables, separately named as Test1, Test2, Test3, Test4.
Get rows from the SQL table.
Add an Apply to each to get email addresses from the SQL table.
Here image that there are at most 3 email address in each row, and they are in the format “firstname.lastname@example.org;email@example.com”.
Within the apply to each3, add the following actions:
Compose with function:
if( and(not(empty(variables('Test3'))),not(empty(variables('Test2')))),concat(variables('Test1'),';',variables('Test2'),';',variables('Test3')), if(and(empty(variables('Test3')),not(empty(variables('Test2')))),concat(variables('Test1'),';',variables('Test2')),variables('Test1')))
Note: this function will return the correct email addresses which will be used in the following actions based on situations. If you have more email address, just try to modify the function.
Under Apply to each3, add Get items from SharePoint list, which contains a multiple selections enabled column.
Add Condition to check if name from SQL table equals to Title from SharePoint list. Apply to each and Apply to each2 will be added automatically.
Under If yes branch, update item with required value, select dynamic content variable4 for the MulPerson Claims field.
Here is an example of the current query I am runny and the output it provides, there will never be a multi select email field it is specific to the individual person. The query results are around 1650 lines.
I will see if your solution might work. I have no problem manually starting the flow just need to be sure that it will amend to the existing fields and add any new ones that may be added.
The unique identifer is the Position Name not the email field as we may have open positions with no email so that is why that is being used.
where CurrentMonthFLG = 'Y'
|Dorinda Reyesfirstname.lastname@example.orgemail@example.com||brc06990||President||Leadership||West||California||ABC||President||John Smithfirstname.lastname@example.orgemail@example.com||123||No|
Keep up to date with current events and community announcements in the Power Automate community.
A great place where you can stay up to date with community calls and interact with the speakers.
Check out the latest Community Blog from the community!