cancel
Showing results for 
Search instead for 
Did you mean: 

Modifing Attribute before writing it into the database

Former Member
0 Kudos

Hi Folks,

I have a little problem with modification attributes before inserting them into the database.

I am currently creating a process to write my own scheduling rules in IDM 8.0 and

automatically inserting them into the tables mc_sched_rule and mc_sched_item.

Now I want to format a time e.g. 8:00 in seconds and write it like 28.800 (seconds after midnight).

But I need to convert it before the to database pass executes, else I'm getting an error.

Like:

Attribute --> Value 8:00 --> Convert it to 28.800 (seconds after midnight) --> Execute to database pass (writing it into the database).

I hope, that I made my question clear.

Regards

Berkay

Accepted Solutions (1)

Accepted Solutions (1)

Steffi_Warnecke
Active Contributor
0 Kudos

Hello Berkay,

couldn't you just work with another attribute for this. The first attribut to save the time. And then another pass, that converts the content of that attribute into your 28.800 seconds (for example), saves it in a second attribute and then writes it into the database.

So one pass "to Identity store" and one "to Database".

.

Or am I missing something here?

.

Regards,

Steffi.

Former Member
0 Kudos

Hello Steffi,

Thanks for your answer!

Using two attributes may work here. I did not think about the splitting of the two values in two attributes.

But i wanted to solve it a bit smoother, in like one way.

I have a different idea about my problem. I thought that I can use "Calling scripts in To-Passes" to achieve my goal.

It's calling the function, that converts my DayTime value for example (8:00) in only seconds from midnight (28.800) executing the to database pass.

This should work too, right?

Regards,

Berkay

Steffi_Warnecke
Active Contributor

Hello Berkay,

try it. 😉 I've never done that before either.

.

Regards,

Steffi.

Former Member

Hi Steffi,

Your answer made me think twice, thank you!

I solved my problem by adding two more tasks and to generic passes. In this way I could convert the needed attributes.

The use of "Calling scripts in To-Passes" worked for me here.

But I couldn't call the function in the to database pass because it is a sql statement, therefore i needed to convert the data before getting into the to database pass.

Grateful,

Berkay

Steffi_Warnecke
Active Contributor

Sometimes all it takes is a little brainstorming with someone else. Glad I could help. 🙂

Regards,

Steffi.

Answers (0)