You are viewing limited content. For full access, please sign in.

Question

Question

Blanking out fields within a collection or sending next person a blank 2nd form

asked on September 9, 2015

I will try to explain this as best as I can. I have a form that a public person can fill out for a complaint. When that complaint comes in, a staff member must review it and make any comments and refer it to another staff member. The way I have it set up is with 2 forms. One for the public, and one for staff comments/review. 

 

When the first staff member reviews the submission, they are looking at the 2nd form (it includes the read only version of the first form). They can make comments and if they have more than one comment they must click "add another comments section" which duplicates the collection. 

 

My problem is this: I do not want the next staff member to be able to change the previous staff members comments, date or time. I originally was thinking of making it read only but within a collection it seems to be difficult to tell forms to only make read only what is currently there but allow them to add a comment. 

This form could loop 100 times if needed, so it's critical I have this functionality. 

So I was going to have upon submit, a workflow retrieve the comment, date and time, and populate SQL with these values and then use this in another field called 'previous staff comments'. 

The next staff member would open the routed form and the comments would either be greyed out or blank. 

Ultimately if upon submit, I could lock down those comments for good I would do that. If anyone knows how to that would be awesome. I have tried the disable function which works but then my SQL data is blank - I don't think workflow sees anything upon submit since it's disabled. 

I've looked at a couple answers but it didn't get me any closer. 

 

Another option is to collect the info in SQL as mentioned, but in the process modeller when sending to the next staff member, send them a blank 2nd form (with the read only values from the public form still). From what I know, this cannot be done. I've looked at the answers regarding 'reset', but isn't exactly what I'm after. 

 

Any help would be greatly appreciated. Attached is the section of form in question. 

forms issue.PNG
0 0

Answer

SELECTED ANSWER
replied on January 15, 2016

Hi there,

Set carried over Table/Collection rows to be read only is supported in Laserfiche Forms 10.

2 0

Replies

replied on September 28, 2015

Hi Shaun,

 

I came up with a couple of ideas for you to grab the info that you need without using collections or tables.

 

First, you can probably utilize the Action History of your form to your advantage. The Action History of each form actually already documents all of the information that you're having your users fill out manually, and Comment fields are automatically added when forms are assigned to someone through a User Task. You can save the Action History through the Save to Repository task as a page of the document, so this info would be kept along with your saved form.

 

Just saving the Action History won't create metadata, so you'd have to use other ways to grab that information. If you would prefer to have a field populated with the information from the Action History so it's part of your form, you can use javascript as in this example to pull the values. It is important to note that within the Save to Repository service task you are only able to save Action History tokens for the previous task performed.

 

If neither of these fits your use case, we could explore more options if you give a few more details about your business process such as how it's being routed and what your process modeler looks like. Thanks!

1 0
replied on October 26, 2015 Show version history

Hi Shaun,
You are correct in that it is not possible to blank out a form in the scenario you suggested. However, after speaking with the Laserfiche Forms team we have come up with a workaround that may work for your use case. The solution is described below.

Basically in this form there are two single lines, and a third field with a helper text on top containing the value of the variable {/_current_step_name}

This third variable is used in JavaScript to control which of the two single lines gets shown.

First in CSS you hide it as such:

#q4 {

  display: none;

}

where q4 is the ID of the third field

and then for the JavaScript

$(document).ready(function () {

  var name = $('#q4 .cf-helptext').text();

  //console.log(name);

  if (name == 'User Task') {

    $('#q1').show();

    $('#q2').hide();

  } else if (name == 'User Task (2)') {

    $('#q1').hide();

    $('#q2').show();

  }

});

name would be the current step name

User Task is the first one in the chain, User Task (2) is the second one.

You can keep adding more else ifs for longer chains but that is basically how it works. The one downside to this is if the second reviewer or whoever looks into the HTML they will be able to see the hidden fields. So that is a possible security issue, but if it is an internal form and the people reviewing it are not likely to look into the HTML then it shouldn’t be a problem. The other alternative is making a 3rd form as you proposed, but it seemed like you wanted to avoid this.
Hope that helps!
Best,
Kevin

1 0
replied on September 28, 2015

Thanks Anita. I still would like to know how to clear a fields value though. Other parts of this form allow a user to do a few things (Like send to someone, mark if it's complete or not, etc) and when it gets sent to the next person I don't want those values displayed. I could design a 3rd form and have unique fields for each new person, but my BP could loop 100 times for 100 people, so I don't want to create a secondary form for these people. 

 

The action history may work for getting values into another field but I would rather use SQL and if I could blank out field values upon each form load, it should all work out. 

 

Does anyone know how to blank them out?

0 0
replied on September 28, 2015

Thanks Anita. I still would like to know how to clear a fields value though. Other parts of this form allow a user to do a few things (Like send to someone, mark if it's complete or not, etc) and when it gets sent to the next person I don't want those values displayed. I could design a 3rd form and have unique fields for each new person, but my BP could loop 100 times for 100 people, so I don't want to create a secondary form for these people. 

 

The action history may work for getting values into another field but I would rather use SQL and if I could blank out field values upon each form load, it should all work out. 

 

Does anyone know how to blank them out?

replied on October 27, 2015

Thanks Kevin, this should work for me. Creating a 3rd form wasn't really an option as it wouldn't stop there, I would have had to make 10 or so (to accommodate a loop of 10 people approving). 

 

I'll test this out and let you know how it goes. Thanks again, very much appreciated. 

0 0
replied on October 27, 2015

Thanks Kevin, this should work for me. Creating a 3rd form wasn't really an option as it wouldn't stop there, I would have had to make 10 or so (to accommodate a loop of 10 people approving). 

 

I'll test this out and let you know how it goes. Thanks again, very much appreciated. 

replied on October 27, 2015

Hey Kevin, 

 

So I have few questions. Where does the 'current_step_name' come from? Is it a system variable that wasn't a part of forms for users to use when building a form? 

 

I have tried this using your business process even, and line 1 and line 2 show regardless if i'm doing user task or user task (2). I've tried unhiding the 3rd field so I can see if it's even grabbing data and it is not. Are you on a different version of Forms or something? 

I didn't think I would have any issues implementing this but it's not working at all. 

0 0
replied on October 27, 2015

Hi Shaun,
So I have some good news and some bad news. This solution was tested using our yet to be released Forms 10. There is nothing related to 'steps' in Forms 9.2, which is the version I am assuming you are currently on.
However, Forms 10 should be released to Laserfiche VAR's for testing in the near future. I believe it was supposed to be near the end of this month, but has been pushed back to November though that is not confirmed. The full live release should be scheduled for Empower 2016 this January.

replied on October 27, 2015

Hi Shaun,
So I have some good news and some bad news. This solution was tested using our yet to be released Forms 10. There is nothing related to 'steps' in Forms 9.2, which is the version I am assuming you are currently on.
However, Forms 10 should be released to Laserfiche VAR's for testing in the near future. I believe it was supposed to be near the end of this month, but has been pushed back to November though that is not confirmed. The full live release should be scheduled for Empower 2016 this January.

0 0
replied on October 27, 2015

Okay so I'm not going crazy haha. Well I'll just have to wait for the VAR release to implement this idea and then January for the customer if all goes well. 


Thanks again for your help!

0 0
replied on October 27, 2015

Hi Shaun,

Just wanted to let you know that the Forms team is definitely taking your use case into consideration. They're working to make this easier in future releases with an out of the box solution without javascript or lookups, so that's also some good news for the future along with the solution that Kevin provided!

0 0
replied on October 28, 2015

Thanks Anita, looking forward to the future releases!

0 0
replied on January 19, 2016

Thank you Abby, this is exactly what I was after. Much appreciated!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.