cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Spassler
Helper III
Helper III

Issue with getting a Max Value Formula to work with SharePoint Connector

So in my App I'm using the below commands, which if I submit it from the app (in preview mode) it works fine. but if I try to then submit it from a phone or the computer it doesn't seem to like the "max" function. 

 

 

so I have field "varBidNumGen" with Default: Max('BidLog 2022',BidNumGen +1)

and field "BidNumber" with Default: Concatenate(First(Split(varBidType.SelecteddText.Value, " ")).Result, varBidNumGen.Text)

 

when I click the formula bar i see it combining AB and the next number 401 so AB401. but it doesn't work when using the phone or computer to fill it out it only posts it to SharePoint as AB. what am I missing?

 

I see its talking about a delegation warning but i only have 1 other record in the list and it only has 22 Columns (including the ones that are created automatically.

 

any help on this would be great... I have also tried the First formula with the same issue.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Spassler ,

Have you tried another mobile device (the problem may be with your phone). You could also try

First(
   Sort(
      'BidLog 2022',
      BidNumGen,
      Descending
   ).BidNumGen
) + 1

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

5 REPLIES 5
WarrenBelz
Super User III
Super User III

Hi @Spassler ,

Firstly try this on the field

 Max('BidLog 2022',BidNumGen)+1

on the rest of it, replace SelectedText (it is deprecated) with Selected, although I am not sure why you are splitting it.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

 

@WarrenBelz,

I changed field "varBidNumGen" Default to: Max('BidLog 2022',BidNumGen) +1

and also changed "BidNumber" Default to: Concatenate(First(Split(varBidType.Selected.Value, " ")).Result, varBidNumGen.Text)

 

to answer your question I'm splitting it because the "bidtype starts with either 2 characters or 3 so i'm using the " " to split the back end of the letters off.

 

Sadly I tried it again from my phone, and it still leaves the number off.

you can see the attached screenshot of my SP list how its not keeping the value of BidNumGen (which will be hidden in the future).

 

and just fyi the SP field "BidNumGen" DataCard has a default of: varBidNumGen.Text

Hi @Spassler ,

Have you tried another mobile device (the problem may be with your phone). You could also try

First(
   Sort(
      'BidLog 2022',
      BidNumGen,
      Descending
   ).BidNumGen
) + 1

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

@WarrenBelz ,

Made the change but it didn't work i had to add an extra .BidNumGen on the end. so code came out as:

"First(Sort('BigLog 2022',BidNumGen,Descending).BidNumGen).BidNumGen +1"

When I hover over the formula for my variable "varBidNumber" it shows at the end = AB401 and no delegation errors now.

 

But when submitting the form it still doesn't concatenate the number behind the letters. This leads me to believe the issue is with the Concatenate formula of: 

"Concatenate(First(Split(varBidType.Selected.Value, " ")).Result, varBidNumGen.Text)"

 

I tool the formula you suggested and added the extra .BidNumGen and made it default to a description field on my form and loaded it from my phone and I see "401" so I know that code is working but why would concatenate not post both values and I don't see any warnings???

 

attached is the photo of the two formulas....

@WarrenBelz,

Warren, so as I had stated, this formula allowed it to work. I had to add the extra field on the end of it though. I gave it a few minutes came back and phone and computer now work along with the preview. 

 

Thanks for the help.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,032)