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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / SharePoint list custom...
Power Apps
Answered

SharePoint list custom form formula

(0) ShareShare
ReportReport
Posted on by 110
Hi everyone! I'm currently working on building a custom form for my colleagues to add new items (requests) to our SharePoint list. 
 
The following formula is used in item field of SharePointForm1. Power Apps seem set the first item of SharePoint list as default item. But this is not a big question. 
If(IsBlank(SharePointIntegration.Selected),Defaults('Inventory Items Updates'),SharePointIntegration.Selected)
 
The following formula is used in default field of Latest End User field. It works for me in DisplayMode.New.
Trim(Text(Now(),"yyyy-") & 
Upper(ComboBox1.Selected.'Staff Code' & If(IsBlank(TextInput1.Text),"",Concatenate("/",TextInput1.Text))
))
 
 
 
However, it still show 2024- when I viewed other item in SharePoint list. How can I use formula to calculate result after they choose primary and secondary end user in DisplayMode.New while showing item data in DisplayMode.View? 
Thanks so much for your help.
Categories:
I have the same question (0)
  • Verified answer
    mmbr1606 Profile Picture
    14,605 Super User 2025 Season 2 on at
    hey
     
     
     
    can u try this:
    If(
        SharePointForm1.Mode = FormMode.New,
        Trim(
            Text(Now(), "yyyy-") & Upper(ComboBox1.Selected.'Staff Code') & 
            If(IsBlank(TextInput1.Text), "", Concatenate("/", TextInput1.Text))
        ),
        Parent.Default
    )
    
    displaymode:
    If(SharePointForm1.Mode = FormMode.New, DisplayMode.Edit, DisplayMode.View)
    
    if it helped, please mark as verified aswer,
     
     
    cheers
  • Ceres2186489 Profile Picture
    110 on at
    Himmbr1606 ! Thank you so much for you big help!
     
    I'm still running into a few issues with building the custom form. Would you please taking a look and seeing if you can help?
     
    1. When the error message "Length of end user code exceeds 20 characters" is visible, user cannot save this new item until they shorten the code.
    2. User need to enter a value for either the latest end user or the current location – they need at least one of those filled in before saving the item.
     
    Thank again for you help.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard