Log Message Activity

How to store array of log messages data into database to a single cell

This is my workflow

Hi @Vanitha_Agamin

Could you please share your Query that you re Using in execute query!

Regards

’ this is missing from your query before update word

If you have an array and want it as a single string, you use the Join method.

LogMessage collection data.xaml (5.7 KB)
This is the workflow. Can anyone please help me…

Hi @Vanitha_Agamin

Try to update the query in the Execute Non Query Activity

“Update Table_1 set [Last Name]=’++’ where [First Name]=‘A’”

Regards
Gokul

Ya, I have used Execute Non Query, at Last Name inside the ++ what I have to mention to get value of the log message out put as a single list

Data Scraping Completed, Storing data to database is completed, Process Completed

Like this kind of output i have to store it in a single cell in the database.

Thank you

Do you have issue in the Query?

SQL Server usually use @ for parameter,

“Update Table_1 set [Last Name]=’++’ where [First Name]=‘@A’”

You can pass the variable inside ++

Regards
Gokul

3 Log Message has a value, I need to get it in a array like (Data Scraping Completed, Storing data to database is completed, Process Completed). So to write the code for this in execute non query

Hi @Vanitha_Agamin

Can you elaborate a query bit more?

As you need to pass the string variables Like Data Scraping Completed,Storing data to database is completed,Process Completed in Update query

Can we know which column its need to updated beacuse in query its mentioned as Last Name?

Regards

I have changed my Execute non query “Update Table_1 set [Status]=’”++"’ where [First Name]=‘A’"…
Status
I have to get the value in database like this, so that what value we have to pass for status. For storing value is from log message

Hi @Vanitha_Agamin

Store the status in array variable

like stringArray = {“Status1”,“Status2”,“Status3”}

And pass then accordingly to update the status!

With Using For each Loop

For each item in Stringarray change the argument type to string

Excecute Non Query

“Update Table_1 set [Status]=’”+item+"’ where [First Name]=‘A’"…

Alternate

Without Using loop

“Update Table_1 set [Status]=’”+StringArray(0)+"’ where [First Name]=‘A’" Status 1

“Update Table_1 set [Status]=’”+StringArray(1)+"’ where [First Name]=‘A’" Status 2

“Update Table_1 set [Status]=’”+StringArray(2)+"’ where [First Name]=‘A’" Status 3

Regards

Thank You.
But I have to store Log Message message property value as a string,
log message1
Data Scraping Completed - Status1
Storing data to database is completed - Status2
Process Completed - Status3
SO that How to get the value of log message and store it as list of array in database.

Hi @Vanitha_Agamin

As you re hardcoding the value in log message the same we can hardcore in array of string

Like
Assign

statusStringArray ={“Data Scraping Completed”,“Storing data to database is completed”,“Process Completed”}

And get the value using for each or indexing method to fetch the value like as said in above post!

Regards

No. I did not re-hardcoad, See my Doubt is to We will create workflow with some log message activity as it is in workflow, i want to fetch value from log message and store into a database as a single list into a single cell
Status
.Like this

Hi @Vanitha_Agamin

Try like below!

Refer to the xaml below!

Use the query in the NON-Execute query in as in Comment!

String_join.xaml (7.4 KB)

Regards

Thank you sir.
But here we have to get value from log message only, do not use assign activity.
this is the problem.

Hi @Vanitha_Agamin

I think we cant get the messages that a have used in logs through studio we can get it by Orchestrator logs!

The method i have mentioned above will be feasible if you re not using orchastrator!

Because you re hardcoding the logs with type as info!

Regards