Hi,
I am trying to change the value of a complex data field (choice in Sharepoint) automatically with the press of a button in another screen. For example, if a student does not pass to the next grade the app would change the class of 2022 to class of 2023 (in highschool). Any suggestions? Thank you in advance.
Not sure of your entire scenario as you have not provided much in the line of details on what you have and how you are trying currently, but in general, the following formula should get you started:
Patch(yourDataSource,
{ID: yourRecordID,
ChoiceColumnNameHere: {Value: 2023}
}
)
I hope this is helpful for you.
It definitely helps. But, I want to do something more standardized, like:
ChoiceColumNameHere: {Value: Value+1}
If you already have the record, then your formula can be:
Patch(yourDataSource,
{ID: yourRecord.ID,
ChoiceColumnNameHere: {Value: yourRecord.ChoiceColumnNameHere.Value + 1}
}
)
If for some reason you do not have the record (and you should to avoid another data lookup), the formula would be:
With(LookUp(yourDataSource, ID=recordID), //or other criteria
Patch(yourDataSource,
{ID: ID,
ChoiceColumnNameHere: {Value: ChoiceColumnNameHere.Value + 1}
}
)
)
This helps a lot. Thank you!
User | Count |
---|---|
253 | |
106 | |
94 | |
50 | |
39 |