Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5564 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I'm having a rather difficult tiime with a script that i am going to try to do my best to explain. When setting up my database, i used the notes feature that is found in the Contact Management example database so that i could actually have a database of all the "Notes". Recently, i have tried to implement a new feature into our notes that lets the user enter in the amount of "hours" they had on a particular note.

The script that i wrote to add the note can be seen in Script.png image that is attached.

That part has worked fine and dandy. Now, i am trying to create a report that is based on the amount of hours a user has entered which is where i am coming into a snag. Since the hours are set into a variable, how can i extract them into a report?

Since i have the variable set to the Notes_Investigation::Hours field i though i would use that but am having an issue. It seems that if i look at the Notes_Investigation database, the hours i am entering are not on the same note. See the image labeled Notes.png

The text field that you see in the Notes.png file is a calculation to combine the date, time, user and hours of the user, along with any text they enter, but it seems that when the user enters their time, it places that time into the Hours field of the note before that. How can i get the time to go to the hours field for the same note?

I hope this make sense since it is driving me crazy lol. Any help would be appreciated

Script.png

Notes.png

Posted

The reason that your hours are appearing in the "previous note" is because your custom dialog is setup so that a user is entering the hours directly into the Notes_Investigation::Hours field.

So when they type in a number into the dialog and then hit ok you are actually allowing them to edit whatever note they are currently on.

What you could do instead is create the new note before you show the dialog and don't even bother with the variable. This way the user will actually be entering data directly into the new record.

Posted

That worked great to get the hours to be on the correct note, unfortunately that created another problem.

On the note itself, I incorporate the time into the beginning of the note with this calculation:

TextColor ( TextStyleAdd ( TextSize ( Lower ( TimeStamp_Creation ) & "  by "   & UserName_Created & " - Time: " & $Hours ; 10 ) ; Bold )  ; RGB ( 0 ; 0 ; 0 ) )& TextSizeRemove ("¶"; 10 )




Note that before this change, i was using the $Hours variable to populate the hours. Since i am no longer using the variable, i changed the calculation to simply use the hours field:




TextColor ( TextStyleAdd ( TextSize ( Lower ( TimeStamp_Creation ) & "  by "   & UserName_Created & " - Time: " & Hours ; 10 ) ; Bold )  ; RGB ( 0 ; 0 ; 0 ) )& TextSizeRemove ("¶"; 10 )

The problem is, the hours no longer show up in the note. Is there any way to get that incorporated into the note without the variable?

This topic is 5564 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.