Hi @Anonymous ,
Do you want to attach a invoice with multiple programs code (Departments)?
Based on the needs that you mentioned, I agree with @jlindstrom 's thought almost. You could consider create another individual SP List (called "Program Codes") to store the programs codes (using "Program Code" column, Text column) and corresponding amount value (using "Amount" column, Number column).
Then within your CC Usage SP List, you should configure the "Program Code" column as a LookUp field type column to reference values from the "Program Code" column in your "Program Codes" List, and enable "Allow Multiple Selections" option for this LookUp field (so that you could selected multiple options within the "Program Code" LookUp column). The Amount field value should be calculated automatically based on the selected options within the "Program Code" LookUp field.
You need to re-generate a new canvas app based on your SP List, then go to the Edit form, set the Default property of the Amount Text Box to following:
If(
EditForm1.Mode = FormMode.New,
Sum(
ForAll(
ProgramCodeComboBox.SelectedItems,
LookUp('Program Codes List', 'Program Code' = Value, Amount) // find corresponding amount value for each selected program code in your 'Program Codes' List
),
Value
),
Parent.Default
)
You could select multiple options within the Program Code ComboBox, then corresponding total Amount value of these selected Program Code options would be calculated within the Amount field data card automatically.
Please take a try with above solution, hopes it could help in your scenario.
Best regards,