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 / Form.LastSubmit.ID is ...
Power Apps
Unanswered

Form.LastSubmit.ID is null

(0) ShareShare
ReportReport
Posted on by 3,506

I have a Main form named "frmItem", where inside it i have a Data-card which contain 3 input fields and a gallery as follow (to represents a Parent / child relation):-

 

onsucess.png

 

one1.png

 

 

now on the Onsuccess of the main form i want to set the SID value of the subform to be equal the main form item ID.. the Onsuccess code for the main form is shown above .. but currently when the value got saved to sharepoint it will show null (the SID will be null).. any idea?

 

 

 

Categories:
I have the same question (0)
  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @johnjohn123 

    Please consider changing your OnSuccess Formula to the following:

    Collect(SNMItems,
     ForAll(colSItems As _item,
     {'Vendor Price': _item.'Vendor Price',
     Vendor: Vendor,
     'Vendor Part No.': _item.'Vendor Part Number',
     SID: Self.LastSubmit.ID
     }
     )
    )

    This assumes that all the columns in your record are the correct types.

     

    I hope this is helpful for you.

  • johnjohn123 Profile Picture
    3,506 on at

    @RandyHayes  ok thanks will try your formula, but why my formula will not work? i got it from this YouTube videos which work for the author @ https://www.youtube.com/watch?v=xgznk4XlPCo check starting at minute 23 .. any idea?

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @johnjohn123 

    His formula is backward, but essentially should still work - just not well.  

    Give the suggestion formula a try and see if that helps in any way.

  • johnjohn123 Profile Picture
    3,506 on at

    @RandyHayes   I tried your formula, but still the SId will be null!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @johnjohn123

    What type of column is SID in your list?

     

  • johnjohn123 Profile Picture
    3,506 on at

    @RandyHayes  of type Number. thanks

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @johnjohn123

    Well LastSubmit.ID will not be null. So, your formula is not doing anything then because of an error. 

    I would take a look in the Monitor Tool and see what is interacting in the OnSuccess.

     

    To be clear though, are you stating that new records get created properly and have the proper 'Vendor Price', Vendor, and 'Vendor Part No.' in them, but no SID?

  • johnjohn123 Profile Picture
    3,506 on at

    @RandyHayes  Yes 100% correct.. the records will be created correctly with the Price,Part No and Vendor,, but the SID will be null!

  • RandyHayes Profile Picture
    76,297 Super User 2024 Season 1 on at

    @johnjohn123 

    What did you see in the monitor tool for the SID column?

     

    OR

    Add the following to the OnSuccess action:

       UpdateContext({lclLastID: Self.LastSubmit.ID})

    Then look a your variables and see what that value is.

     

  • johnjohn123 Profile Picture
    3,506 on at

    @RandyHayeswhen i added this to the OnSuccess for the form

       UpdateContext({lclLastID: Self.LastSubmit.ID})

     

    and i checked the variables, it will say that "No Value"

     

    johnjohn123_0-1629399482648.png

     

     

    any idea?

    Thansk

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard