Skip to main content
Participant
May 1, 2023
質問

Carrying over only some of the form field

  • May 1, 2023
  • 返信数 3.
  • 1082 ビュー

I am trying to figure out how I can put a full middle name in the forst field, but then it only produce the middle initial on certain pages following. Im also trying to do the same with a SSN- only the last 4 populate on certain pages. Can this be done?

このトピックへの返信は締め切られました。

返信数 3

try67
Community Expert
Community Expert
May 1, 2023

Your first request is tricky to do correctly. I would advise against it because if you get it wrong people will be upset with you.

For example, if someone's middle name is John-Paul your script might identify it as one word and only use J as the initial, when in fact it's JP. It's best to let people decide for themselves how to write their own name.

Participant
May 1, 2023

For what I need it for, it's perfect if itnonly tranlates that one initial unless policy changes. Thank you for letting me know that though.

Nesa Nurani
Community Expert
Community Expert
May 1, 2023

It can be done by using slice() method.
To get four last numbers of SSN use like this in 'Custom calculation script' of
field where you want to show last four numbers:
var str = this.getField("SSN").valueAsString.slice(-4);
event.value = str;

To get first letter from middle name use slice(0,1).

ls_rbls
Community Expert
Community Expert
May 1, 2023

Hi @Nicole23641873ej9u ,

 

Are you currently using any script(s)?