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

Discussion

Discussion

Button label via changeActionButton not Reflected in Action History

posted on May 24, 2024

I was very excited to be able to update the button label with the new LFForm object library. However, the Action History does not seem to honor the labels. Action History still just shows Submit as the decision that occurs instead of the label that it was changed to prior to clicking the button.

The use case here is that I need to make a decision before I submit the form to help control what the required fields are. So the Submit button labels change based on the decision field value. However, the Action History does not easily indicate what decision was made.

Out of the box when we change the label on the user task it DOES change what is shown in the Action History. So I do not understand why the LFForm object action changeActionButton does not change it in the same way.

LFForm.onFieldBlur(() => updateActionButton(), {fieldId: 89});

function updateActionButton() {
  var decision = LFForm.getFieldValues({fieldId: 89});
  console.log(decision);
  LFForm.changeActionButton("Submit", {label: decision});
}

 

1 0
replied on May 28, 2024

Since it's just Javascript functionality impacting the form, I seriously doubt that it pushes the information outside of the current form into the process history.  That said - I think it would be a good idea for Laserfiche to enhance it so that it does work that way...

As a workaround, could you create buttons on the user task for all possible labels, and then use Field rules to show/hide the specific buttons needed, rather than using the Javascript functionality to change the button labels?

0 0
replied on May 28, 2024

Yes, but that increases the complexity when I truly thought that the intent of this function. I'm not sure any other use case for changing the button labels if it doesn't record the button label in the action history.

0 0
replied on May 28, 2024

I completely agree - I think it should be enhanced to work that way.

1 0
replied on May 28, 2024

Yes, the original intent was to purely change the display of the button purely for translation purposes where in this case we did not want to change it in the action history because we wanted the original value to be displayed.

I'm not sure if its technically possible with our current approach but I will check with the team. It would be nice to expand this function to handle showing inaction history as well as allowing show/hide

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

Sign in to reply to this post.