jaswerl
Novice

People Picker populates but throws people picker required error

See the attached screen shot. This was working this morning and all I did was create an a datafield to hold the telephone number and an expression to remove the dashes and replaced the output data for the telephone text box with the new datafield to show the telephone number without any dashes. Now I get this: This was not showing yesterday and this morning before I made the telephone change (which does not work by the way).I undid the telephone rules and it still occurs. Cleared my cache and reopened the designer and it still occurs.

3409ae62-a022-48d3-ac1a-64e529110b7b.png

 

Tags (1)
0 Kudos
Reply
9 Replies
YUDI2
Apprentice

Re: People Picker populates but throws people picker required error

You may try open the view and see if there is code break warning.

or probably smartobject used by picker has a required parameter that not is accepting empty or blank value.

or your formula expression fail to perform because the value is empty (telephone number field)

 

Reply
jaswerl
Novice

Re: People Picker populates but throws people picker required error

Hi YUDI2,

Thanks for the feedback. No code break warnings on the view. the telephone number is present. I should mention the while the picker populates with the authenticated user it is allowed to change the user as if someone else was filling out the form for the user in EmployeePicker. Therefor there is an On Change rule on the view that has almost identical rules except that instead of the Name Key as the input I put EmployeePicker as the input. It worked like a charm for several days now it throws the error.
 

0 Kudos
Reply
YUDI2
Apprentice

Re: People Picker populates but throws people picker required error

You may further investigate the issue by checkin’ on debug information.

https://help.k2.com/onlinehelp/k2five/userguide/current/default.htm#Create/Forms/DebuggingForms.htm

 

or it also helpful to output the value using ShowMessageAction.  

https://help.k2.com/onlinehelp/k2five/userguide/Current/default.htm#How-Tos/ShowAMessageAction/HowTo...

0 Kudos
Reply
jaswerl
Novice

Re: People Picker populates but throws people picker required error

YUDI2 your second suggestion helped immensely. The Change rule on the view appears to fire “ first” instead of the form initiation rule. This change rule has the circular logic of the input being the value of the EmployeePicker that should have been set in the Initiation Rule. Yet the name value is set correctly in the change rule so it must have got the input from the initiation rule. If doesn’t make sense.I guess the change from the EmplyeePicker being blank to it being the authenticated user is causing the change rule to fire when I don’t want it to fire. Is there a way to prevent the Change rule from firing Until someone deletes what’s in the EmployeePicker and chooses another user.

0 Kudos
Reply
YUDI2
Apprentice

Re: People Picker populates but throws people picker required error

I think you can use a Flag to control your logic.  You can make use a hidden textbox to store the flag and you use it for your checking in change rule.

0 Kudos
Reply
jaswerl
Novice

Re: People Picker populates but throws people picker required error

YUDI2 Thanks for the feedback. Can you explain a litter more about using a flag to control the change logic? I have included some screen shots,

7002cb2a-4b00-409f-81da-3e305e332a3a.png
d99df393-b7a7-4c8d-89d8-d3b2bc8109f3.png
The Change Rule, though I think the rule below in the initiation block does fire first an populate the employee name picker The change overwrites it and the app is no longer accepting the Input above with the Error Name is a required field.
bee8591c-8f72-4605-a152-c13f89f4fe52.png

 

0 Kudos
Reply
YUDI2
Apprentice

Re: People Picker populates but throws people picker required error

Maybe you can try to control onchange event firing by:

  1. Add Textbox text, Name it as HIDDENFLAG and you hide the control
  2. On Initiation Event ( where initiation block does fire first an populate the employee name picker),  on the first line, Set HIDDENFLAG textbox value as “LOADING”.   then on the last line set HIDDENFLAG textbox as empty.

          example:

          On Initation event :

          line 1.Transfer data “LOADING” to HIDDENFLAG texbox

                   ....

                   ....

                   …,

          line 5.Transfer data “”  to HIDDENFLAG textbox

 

       3. Modify employeenamepicker onchange event. on the first line, check if value HIDDENFLAG is empty before executing the logic.

 

         example:

         on employenamepicker change event.

         Line 1. If HIDDENFLAG is empty  then execute below 

                             ….. 

                             …..

                             …..

 

This logic will prevent rule on employename picker onchange event to be executed when initiation block does fire picker onchange event when populate employename picker.

0 Kudos
Reply
jaswerl
Novice

Re: People Picker populates but throws people picker required error

Thanks for the instructions YUDI2. I implemented them to the letter but it didn’t work. The first line of the On change block has to be the On Change event. I put the Hidden flag is empty next. I prevented the  block from firing but something about the On Change Rule was always clearing the Employee field. I’m just going to simplify the process, auto fill the submitter name and have the submitter pick the Employee and fill the details from the on change rule. Thanks anyway.

0 Kudos
Reply
YUDI2
Apprentice

Re: People Picker populates but throws people picker required error

jaswerl wrote:

Thanks for the instructions YUDI2. I implemented them to the letter but it didn’t work. The first line of the On change block has to be the On Change event. I put the Hidden flag is empty next. I prevented the  block from firing but something about the On Change Rule was always clearing the Employee field. I’m just going to simplify the process, auto fill the submitter name and have the submitter pick the Employee and fill the details from the on change rule. Thanks anyway.

I think you should check further the logic that always clearing the employee field and simplified the process also good idea as it works for you.

0 Kudos
Reply