on 10-12-2018 3:27 PM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
Hello Berkay,
try it. 😉 I've never done that before either.
.
Regards,
Steffi.
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
Sometimes all it takes is a little brainstorming with someone else. Glad I could help. 🙂
Regards,
Steffi.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.