Hello! I'm hoping someone can help me with this!
About the App: I'm currently creating a Test Case Creator App, where users will be developing test cases. They are wanting each User Story to have Test cases associated with them that have appended numbering and then store that number on a SP List.
When I'm creating a new record, I'm counting all the items in a Gallery and adding 1, then patching the new record to my SP List (eg:"US01-1", "US01-2", "US01-3", "US01-4", "US01-5", etc.) from a text field.
Requirement/Want: I have a requirement where a user is wanting to delete test case(s) and renumber ALL affected test case number. I have a trash can for each Gallery item and when selected, I want to remove the record from my SPList then renumber all other items in the gallery and patch those new numbers back to my list. For instance, if I remove "US01-3", "US01-4" will then become "US01-3" and "US01-5" will become "US01-4".
In my main Gallery, I currently have the below code applied on my Items property, which, will renumber the items. However, they are wanting the value stored on the SP list and not just in the App.
With(
{
ThisGallery: Filter([MYSPLIST],[REFRENCEID] = varRecord.[REFERENCEID])
},
ForAll(
Sequence(CountRows(ThisGallery)),
Patch(
Last(FirstN(ThisGallery,Value)),
{rowNum:varRecord.[REFERENCEID] & "-"& Value}
)))
Thank you!!