0 votes

Hi guys,

In our organisation we have a lot of collegues who not working all days of the week.
On this moment I'am implementing a automatic signature tool and everyone has to mention there working days. Because this signature tool reads out all the AD information, I like to fill an CustomAttribute field with that information so this is automaticly provided in the user signature.

In the Adaxes Selfservice portal, I want something like a checkbox field so people can select there working days by themeself.

Is there an possibility to provide such option through the Adaxes portal?

Thanks in advance!

Sven

by (50 points)
0

Hello Sven,

Did you try using the built-in Logon Hours property? It can be edited in the Web Interface like the following:

For information on for to add the property to View and Modify User forms in the Web interface, have a look at the following tutorial: http://www.adaxes.com/tutorials_WebInte ... diting.htm.

0

Thanks for the reply en solution. But this creates an octet value which is unusable in my email signature tool because it takes the octet value as plain text.

I'am looking for a checkbox option like;

□ Monday
□ Tuesday
□ Wednesday
□ Thursday
□ Friday

And the output to an CustomAttribute field example must be something like this;

Monday, Tuesday, Thursday, Friday

Thanks in advance!

Sven

1 Answer

0 votes
by (289k points)
selected by
Best answer

Hello Sven,

You can use Adaxes custom Boolean attributes (e.g. CustomAttributeBolean1-CustomAttributeBolean5) for checkboxes. For information on how to change property display names, have a look at the following help article: http://www.adaxes.com/help/?HowDoI.Mana ... Names.html.

To output the working days into a text property (e.g. CustomAttributeText1) you need to create a Business Rule triggering After Updating a User. To create the rule:

  1. Launch Adaxes Administration Console.

  2. Right-click your Adaxes service node, navigate to New and click Business Rule.

  3. On step 2 of the Create Business Rule wizard, select User Object type.

  4. Select After Updating a User and click Next.

  5. Click Add Action.

  6. Select Run a program or PowerShell script.

  7. Paste the script below into the Script field.

     $signatureTemplate = "I work on " # TODO: modify me
     $signatureAttribute = "adm-CustomAttributeText1" # TODO: modify me
    
     $booleanAttributeIds = 1..5
     $modifySignature = $False
     $workdays = ""
     foreach ($attributeId in $booleanAttributeIds)
     {
         $attributeName = "adm-CustomAttributeBoolean$attributeId"
         if ($Context.IsPropertyModified($attributeName))
         {
             $modifySignature = $True
         }
         try
         {
             $value = $Context.TargetObject.Get($attributeName)
         }
         catch
         {
             $value = $False
         }
         if ($value)
         {
             switch ($attributeId)
             {
                 1
                 {
                     $workdays += "Monday, "
                 }
                 2
                 {
                     $workdays += "Tuesday, "
                 }
                 3
                 {
                     $workdays += "Wednesday, "
                 }
                 4
                 {
                     $workdays += "Thursday, "
                 }
                 5
                 {
                     $workdays += "Friday, "
                 }
             }
         }
     }
    
     if ($modifySignature)
     {
         if ([System.String]::IsNullOrEmpty($workdays))
         {
             $signatureTemplate += "N/A"
         }
         else
         {
             $signatureTemplate += $workdays.TrimEnd(", ")
         }
    
         $Context.TargetObject.Put($signatureAttribute, $signatureTemplate)
         $Context.TargetObject.SetInfoEx(@($signatureAttribute))
     }
  8. Enter a short description and click OK.

  9. Click Next and finish creating the Business Rule. You should have something like the following:

0

Hi Support2,

Thanks for the script and steps. I created the form for the users so they can select there days.

When is select a single day, everything goes wel.

But when multiple days selected, most of the time the script generates N/A or does not show all the days.

I hope you can help me with this issue.

Thanks again!

Sven

0

Hello Sven,

There was a small error in the script. We've fixed it. Recopy the script from the post above.

0

Works like a charm! Many thanks for your help!

Kind regards,

Sven

Related questions

0 votes
1 answer

I want to add a custom column in a report that displays members of a group that shows the age of the user account in days. Is that possible?

asked Oct 23 by msheppard (470 points)
0 votes
1 answer

We need to run a scheduled task twice a year, so I chose every 182 days like it's suggested in here, only problem is that there is no way to change the next run ... really don't want these tasks to be triggered again if they've already been executed this year.

asked May 8 by boing (20 points)
0 votes
1 answer

I'm trying to modify this report to only output results where employeeType equals the values below. It reports fine. I would also like to include where employeeType ... = "(&" + $filterUsers + $filterPasswordLastSet + $customAttribute + $enabledUser + ")"

asked Mar 28 by tromanko (330 points)
0 votes
1 answer

Hi, we currenlty have a business rule to send an email everytime the Title, Manager, Department, accountExpires, EmployeeType or FirstName attributes are ... Unit: %BusinessUnit% End Date: %accountExpires% Effective Date of Change: %adm-CustomAttributeDate2%

asked Feb 14 by KevC (60 points)
0 votes
1 answer

Is there a report, or a way to make a custom report, to show when a custom command was run and who it was run against? The Operation in the log is "Execute Deprovision User Account"

asked Apr 11, 2023 by stlouischiefs (20 points)
3,552 questions
3,242 answers
8,243 comments
547,828 users