Input Reference Selector - not found mf

I am having trouble making this work. The documentation in the App store says: "This microflow is triggered when a string is entered that does not match any existing objects in the scope (constraint) (instead of the onchange microflow). It creates a new object with the string in the attribute, puts it in the reference and calls the microflow with the parent object. Make sure you either commit or delete the object here." I cannot make sense of this - nothing I have tried works. I want to display a message that the entered string is not in the database and set the attribute to empty. Can someone give me more guidance on what I should put in my mf? Many thanks, David
1 answers


I'll take a shot:

  • lets say you have 2 entities, Player and Team.
  • Each entity has 1 attribute, Name
  • there is an association between the 2 such that each Team can have many players and each player can have only 1 team
  • on a Player new edit page, you would have 2 entry fields, Player.Name and input reference selector for the association pointing to attribute Team.Name
  • if the user types in a team name that is not in the database, the widget will create a new Team object with the Name entered by the user, populate the reference between Player and Team with the newly created object, and then invoke the Not Found Microflow and pass in the Player entity

To accomplish what you want, I think your microflow should have the following Activities:

  • Retrieve the Team object from the passed in player via association
  • Delete the Team object (Deleting the Team object should empty out the reference between Team and Player)
  • Display a message box that the team entered does not exist, and instructing the user to try again

Is this similar to what you have tried? If so, what results did you get?