Hi Andrew,
After checking the shared .oml file, I found some gaps in the implementation for the required use-case.
Code Changes
- In the Voting entity definition, I have changed the Data Type of Rating attribute from Text data type to Integer data type (Rating value can be either Integer or Decimal type value)
- In the Voting entity, I have introduced an additional attribute called UserId, in order to store the voting value against a specific user
- Defined a screen aggregated referring Voting entity as its source, with a UserId = getUserId() filter condition (passed the obtained Rating value as the input parameter to the StarRatingBlock)
- Defined a local variable of Voting Entity record type, to hold the respective values and to map the same to the VotingEntity CrateOrUpdate Entity action in the Save button action flow.
- Included some code changes in the Block event Handler action flow, to insert the voting information to the respective entity.
Please refer to the attached updated .oml file.
Hope this helps you!
Kind regards,
Benjith Sam