Highlighted
Roast Chef
Roast Chef

iPad Field Lengths

Jump to solution

Hi all, does anyone know if it is it possible to restrict the typing character length of a field on the iPad; we have a field which is limited to 255 characters in the browser but the iPad is permitted to type as many as is entered - this then causes a synchronization failure? Is there a known way to restrict an iPad field length preventing the limit being exceeded? I would preferably like the iPad to stop typing when the limit is reached thus reducing synchronization issues from the field team. Any help is welcomed!

Thanks,

Mark

0 Likes
Reply
1 Solution

Accepted Solutions
Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

I believe the carriage returns that are allowed in the Text Area field type may be whats causing you some grief.

Create a new custom field and set the field type to  Text, and on the next screen, set your length to what you would like to to be.

In a test profile, add this field to an SFM in a test profile, and see if you remedy the error.

Text.PNG

length.PNG

This post was modified to remove the advice of changing a field type in the production environment.

Thanks Richard Lewis

View solution in original post

Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

Is this in a web browser or the FSA and/or IB App?

0 Likes
Reply
Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Scott,

The summer 16 for iPad application, is where we cannot resolve this issue?

Any ideas?

Regards,

Mark

Sent from my iPhone

0 Likes
Reply
Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark,

Is this a custom field, or a managed field?

Which Object does it exist on?

Is the Data Type 'Text', 'Text Area', 'Text Area (Long)', 'Text Area (Rich)', or 'Text Area (Encrypted)'?

0 Likes
Reply
Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Scott,

The field is Custom field within the Work Order and is displayed as:

Text Area (255)

Hope this helps, I will look at Richard’s suggestions also.

Thanks both.

Regards,

Mark

Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Richard,

I am unable to do this as you suggest – because when editing the field type – LEN (Business_Opportunity_details) <255 it says that this field cannot be used with this syntax?

Regards, Mark

0 Likes
Reply
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark Varley​, have you looked at the use of a ServiceMax data validation rule for this. If you have a text field type then try this:

LEN

Description:Returns the number of characters in a specified text string.
Use:LEN(text) and replace text with the field or expression whose length you want returned.
Example:LEN(PartNumber__c)

This formula returns the number of characters in a Product Code field.

I haven't tried it so not sure if it will work in a ServiceMax data validation rule. However I think its worth a try with a greater than check. If not a text field then you may be able to convert the value to text first in the data validation rule formula and then do the check.

The benefit of using this instead of the native Salesforce validation on the field length is that is will show as soon as the user tries to save instead of having to wait for a sync and then getting a sync error. If you set it as a validation of type error then it will not let the user save the record until they have corrected to the right number of characters.

Let us know if this works for you and if you find a way to do this as the user types instead of on save.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
Reply
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Previous response from Mark:

Hi Richard,

I am unable to do this as you suggest – because when editing the field type – LEN (Business_Opportunity_details) <255 it says that this field cannot be used with this syntax?

Regards, Mark

-------------------------------------------------------------------------------------------------------------------------

New response from Richard:

Hi Mark, does it work without the <255 on the end and return you the number of characters in the field?

- If it does then its a case of finding the way to express what you need in the formula.

- If it doesn't then it looks like LEN is not a valid syntax for this field type.

Is there a possibility of creating a new field to use instead that is standard text instead of text (area)?

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
Reply
Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Richard

No, it doesnt work with the <255 missing - it says that field cannot be used as part of the syntax. Do you think a Text only is better than just Text Area?

Thanks for your help!

Regards,

Mark

0 Likes
Reply
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark, it depends on what your use case is. I suggest creating a new text only field in your test system and seeing if the LEN function will work. There is very little difference between 'Text' and 'Text (area)', see below.

Text- Allows users to enter any combination of letters, numbers, or symbols. You can set a maximum length, up to 255 characters.

Text - Allows users to enter up to 255 characters that display on separate lines similar to a Description field.

Source - Help | Training | Salesforce

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
Reply
Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

I believe the carriage returns that are allowed in the Text Area field type may be whats causing you some grief.

Create a new custom field and set the field type to  Text, and on the next screen, set your length to what you would like to to be.

In a test profile, add this field to an SFM in a test profile, and see if you remedy the error.

Text.PNG

length.PNG

This post was modified to remove the advice of changing a field type in the production environment.

Thanks Richard Lewis

View solution in original post

Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Scott, Ok will try that, will this limit the iPad to only allow the user to type the number of characters I select? Thanks for your help!

0 Likes
Reply
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark, for a Production solution I suggest adding a new field and retiring the old field. Alternatively you can export all of the data in the field, reformatting the data and then loading it back in after field type change.

Changing the field type of a field is to be avoided if possible to avoid data loss and unexplained behavior. It is best practice to add a new field and retire the existing one.

I am unsure how changing a text area field to a text field will behave with data. I expect what will happen is you will loose all data after the first carriage return.

It is likely that the area behavior of the field is what is causing the app to misbehave and not count characters properly, as Scott suggests, but it isn't expected behavior. It feels like you found something that is unsupported by the ServiceMax app.

Regards, Richard.

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

Very good information Richard. Ill edit my original comment to reflect the same. Id not considered that.

Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Scott, thanks, I have seen it forgotten in the past so its usually top of my mind.

When editing an existing field then consider the existing data, existing records, new data and new records.

When creating a new field then consider existing records, new records and new data in the field.

This should flow through to test. Always, when making these sorts of changes, test with newly created data after the change has been made AND data created and/or populated before the change was made. Check that the data you have in the system before you make the change can have every business action completed with it and that you dont leave yourself with for example a load of Work Orders your users can't close because the users no longer have access to old picklist values.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

NB: Scott Willis, thanks for your posts and input! It is really helpful to hear your experiences with field length and to have the suggestions you are sharing. I hope you are enjoying the new gameification rewarding you for your participation

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
Highlighted
Roast Chef
Roast Chef

Re: iPad Field Lengths

Jump to solution

Hi Richard,

Absolutely great! I have changed the field type in the sandbox and performed some tests using the iPad, and you’re absolutely correct – the field stops typing at 255 characters, which is a massive step forward – historically the technician could type on and on, and then when sync’d it would cause a failure and then be very difficult to resolve easily. As there is only ever 255 characters been allowed back to the system, would it impact any older ones because there would have only been a maximum of 255 ever come back, so I would think I shouldn’t find any historical data is corrupted? When I export all entries to that field I only get 255 maximum across all records?

That’s a great help, thank you very much.

Regards,

Mark

Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark, The text area field allows text to be populated with carriage returns. I expect if any text has been entered like this then you would loose the data after the first carriage return. So if you are planning on changing your existing field you should export all data in the field for all records, reformat without the carriage returns and then re-import it after you have changed the field type. You also need to do full regression testing to make sure no code or config has been affected by the record type change.

My recommended option is to create a new field and change your functionality to use that instead. You can export the data and then reformat and load it into this field. However you also have to re-link all your functionality and reporting to the new field.

Up to you.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
Reply
Highlighted
Staff Chef
Staff Chef

Re: iPad Field Lengths

Jump to solution

Hi Mark, one more point. If your question is now answered then please mark the response that answered it as correct. This helps other Community users find answers to their questions quickly and to locate the correct answer to a question.

Regards, Richard

~If my post was useful, please give me a thumbs up! Mark correct answers as 'solutions' so we can all find answers faster!~
0 Likes
Reply
Highlighted
Sushi Chef
Sushi Chef

Re: iPad Field Lengths

Jump to solution

Our users are not able to exceed length constraints on their iPads. We have encountered unexplained issues, when ios versions were not current or users inadvertently downloaded an app versions different from current production.