cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Can anyone spot the error?

Set(varProtoc;Label15.Text&Last(Sort(Filter(Investigação_de_Ocorrências;StartsWith(ID22;Label15.Text));ID23;Ascending).ID23 + 1)

1 ACCEPTED SOLUTION

Accepted Solutions

@VieiraGuilhermo ,

I think I put in the wrong bracket

Set(
   varProtoc;
   Label15.Text & 
   Last(
      Sort(
         Filter(
            Investigação_de_Ocorrências;
            StartsWith(
               ID22;
               Label15.Text
            )
         );
         ID23;
         Ascending
      )
   ).ID23 + 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
Super User III
Super User III

If ID22 is not a column name but just a row number, then it should be in quotations "ID22"

Also you cannot add 1 to ID23 as it is not a number.

 

You can provide a sample of your table as a screen shot for further suggestions

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Super User III
Super User III

Hi @VieiraGuilhermo 

Assuming ID22 is Text and ID23 is a number, you are missing a closing bracket but I assume ID22 is Numeric, so you would need this

Set(
   varProtoc;
   Label15.Text & 
   Last(
      Sort(
         Filter(
            Investigação_de_Ocorrências;
            StartsWith(
               Text(ID22);
               Label15.Text
            )
         );
         ID23;
         Ascending
      ).ID23 + 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.

 

VieiraGuilhermo_0-1611315416009.png

Here is a sample of my DB, ID22 - is the initial of my protocol number, ID23 is the number part of my protocol number, and ID 24, will be the input that will be generated by my powerapps when i submit my Form.
Everytime i submit it will input all the 3 datas. 

What i expect of this is to filter the ID22 according to what my user select, get the last ID23 after filtered, concatenate the string part and the number part and submit it to ID24

User selected Near miss: Label15.Text = "NEA - "
Filter the table looking for all data that startswith "NEA - ", get the last "NEA - " id number (ID23) (lets supose it is 10), my varProtoc = "NEA - 10", and a field in some form will get this value and upload it to my sharepoint list ( ID24)


@WarrenBelz ; @eka24 

@VieiraGuilhermo ,

I think I put in the wrong bracket

Set(
   varProtoc;
   Label15.Text & 
   Last(
      Sort(
         Filter(
            Investigação_de_Ocorrências;
            StartsWith(
               ID22;
               Label15.Text
            )
         );
         ID23;
         Ascending
      )
   ).ID23 + 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

Hi @VieiraGuilhermo ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (60,462)