Hello Guys,
i am building a JSON file in Power Apps app , which i would like to pass to my small automation for populating a Word Template.
Set(jsonObj, JSON({
FirstName: Office365Users.MyProfileV2().givenName,
LastName: Office365Users.MyProfileV2().surname,
OrderDate: Text(DateValue(First(PatchedRecords).createdon), "yyyy-mm-dd"),
Products: ForAll(CartItems,
{
ProductID: ProductID,
Quantity: ThisRecord.Quantity,
LicenceType: LookUp(Choices(LM_Products.LicenceType), Value = licenceType).Value,
ProductName: LookUp(LM_Products, ProductID = CartItems[@ProductID], ProductName),
Vendor: LookUp(LM_Products, ProductID = CartItems[@ProductID], Vendor),
OrderedUnitPrice: LookUp(LM_Products, ProductID = CartItems[@ProductID], ProductPrice),
EndOfLicence: LookUp(LM_Products, ProductID = CartItems[@ProductID], EndOfLicence),
ProductPrice: LookUp(LM_Products, ProductID = CartItems[@ProductID], ProductPrice),
TotalPrice: Quantity * LookUp(LM_Products, ProductID = CartItems[@ProductID], ProductPrice)
}
)
}, JSONFormat.IndentFour))
How can i get the Label from the chocies? Because right now in JSON in LicenceType, i have number of Choice (Value), but i need to get the name (label) of choice.
Thanks a lot
Jan Lemon