cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SeanBuckley2698
Regular Visitor

I want to give the user back a Reference Number which is generated when the user adds an item in a form

Hi, I was wondering what would be the best way of giving the reference number back to the user after they enter a form submission? The reference number is generated in the sharepoint list when the user adds an item. I would like to give them this reference number back in the form of a notification in the app.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @SeanBuckley2698 :

Could you tell me what Reference's data type is?

I assume it is a calculation type(or text type), then it will be mapped to powerapp as text type.

In my original solution, I used Text(ID) to convert ID to Text type, but if Reference is originally Text type, it can be directly referenced without the Text() function.

Please try:

 

SubmitForm(XXXXX);/*submit the record*/
Notify(
    "The reference number of the record you just submitted is:" & 
        First(
            Sort(
                'Your SP list',
                Modified,
                Descending
            )
        ).Reference

)

 

Best Regards,

Bof

View solution in original post

7 REPLIES 7
krishnags
Responsive Resident
Responsive Resident

@SeanBuckley2698 If you are using Form Control - you can leverage "LastSubmit" of the Form Control. If you are using Patch, try using ClearCollect(colSubmittedData,Patch Function goes here). colSubmittedData.ID - gives you ID for a submitted record

 

You can refer this too -

https://www.youtube.com/watch?v=R0aZipw8S_U

https://mspowerassist.blogspot.com/2020/08/how-to-show-successfully-submitted.html

TesDA
Responsive Resident
Responsive Resident

You could also just add a note to the screen with a lookup to the reference number:

 

ThisItem.ID or if they selected the item from a Gallery: GalleryNameHere.Selected.ID

RMC-Pro
Helper II
Helper II

Maybe sending an e-mail to a user  with submission confirmation and record ID (e.g., ThisItem.ID, colSubmittedData.ID) could be the solution for you - if this is not too frequent and you want to provide proof of evidence for user.

v-bofeng-msft
Community Support
Community Support

Hi @SeanBuckley2698 :

Do you want to inform the user of the value of the "reference number" just submitted by a notification?

Could you tell me what reference number's data type is?I assume it is 'Number'.

I sugget you use Notify(),I'v made a test for you reference:

 

Patch(XXXXX);/*submit the record*/
Notify(
    "The reference number of the record you just submitted is:" & Text(
        First(
            Sort(
                'Your SP list',
                Modified,
                Descending
            )
        ).ID
    )
)

 

Or

 

SubmitForm(XXXXX);/*submit the record*/
Notify(
    "The reference number of the record you just submitted is:" & Text(
        First(
            Sort(
                'Your SP list',
                Modified,
                Descending
            )
        ).ID
    )
)

 

51.gif

Best Regards.

Bof

 

Thanks a lot and yes it is Number type. I will try this out.

Hi I tried this code and it worked with ID but I have a column that calcs a reference number and that's the column  I need to pull in. Do you know why it wouldn't be working with the reference column. I only replaced the .ID with .Reference

Hi @SeanBuckley2698 :

Could you tell me what Reference's data type is?

I assume it is a calculation type(or text type), then it will be mapped to powerapp as text type.

In my original solution, I used Text(ID) to convert ID to Text type, but if Reference is originally Text type, it can be directly referenced without the Text() function.

Please try:

 

SubmitForm(XXXXX);/*submit the record*/
Notify(
    "The reference number of the record you just submitted is:" & 
        First(
            Sort(
                'Your SP list',
                Modified,
                Descending
            )
        ).Reference

)

 

Best Regards,

Bof

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,541)