web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / New Line in Business Rule
Power Apps
Unanswered

New Line in Business Rule

(1) ShareShare
ReportReport
Posted on by 34

I have a Table with a Business Rule that defaults a Text Field to a value. However, I would like to insert a new line into the Text Field as there are multiple lines of text set at default.

 

Does anyone know if this is possible? 

Categories:
  • M_Ali_SZ365 Profile Picture
    1,110 on at

    Hi, @WillboBaggins ,

    Here's how you can set the default value of the Text Field to include a new line:

    "This is the first line" & Char(10) & "This is the second line"

    ____________________________________________________________________________________________________________________________

    If my post helped, please mark it as Accept as solution to help others find it. A Thumbs Up would also be appreciated if you found it useful. 

    Warm regards,
    Muhammad Ali

     

  • WillboBaggins Profile Picture
    34 on at

    Hi @M_Ali_SZ365 

    That didn't work, it just placed the text exactly as its typed into the Text Field, double quotes and all.

  • dcbakerman Profile Picture
    14 on at

    Did you ever solve this issue? I'm trying to do the same thing.  I have tried Char(10) and Char(13) as well as wrapping in CONCANTENATE(). No help.

  • MyAdminAccount Profile Picture
    2 on at

    Hi @dcbakerman 

    I have not been able to solve the issue. I tried escaping the new line using \n but that also doesn't work.

  • dcbakerman Profile Picture
    14 on at

    I never found a way to add a CR or LF to the text I was trying to add to field.  I decided to use a Javascript event handler. In my case, If the value of the Maintenance Type field is "Post Rental Cleaning (

    758270005 in script), I want to write a template into the Work Performed field for employee to fill out.  I trigger off the OnChange event for my Maintenance Type field.  You can also trigger of the form OnLoad event.
     
    Hope this helps.  The Javascript for event handler is below.
     
    function PostRentalCleaningTemplate(executionContext)  {
               
        var formContext = executionContext.getFormContext(); //get form context
        var maintType = formContext.getAttribute("bkl_maintenancetype").getValue();  //get value from form
        // alert( "Mant Type is: " + maintType );  //debug display value of variable
        var newTemplate = "POST RENTAL CLEANING CHECKLIST \n The person completing each item should put their initials at front of each item. \n \n 1)Review Performance report \n 2)Review Consumable Report \n 3)General Cleaning Only? (yes/no) \n 4)Targeted Issue? (yes/no) \n    4a)Describe issue & solution \n 5)Update ALERT field on equipment screen?"\n;
           
        //check for post rental cleaning
        if (maintType == 758270005) {
            // add template to Work Performed
            //use logical name for columns not schema name
            formContext.getAttribute("bkl_workperformed").setValue(newTemplate);
            //alert(newTemplate);  //debug msg
          }    
       
    } //END PostRentalCleaningTemplate
     
  • dcbakerman Profile Picture
    14 on at

    @MyAdminAccount did you see this response?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard