Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Add new option to option set dynamically by javascript using model driven form

Hi All,

I have created an empty option set called Clients. 


Created a field with datatype as option set and selected Clients option set in EntityA.


I have dynamically added items into empty option list in Main information form using javascript:

what i mean:

client and country both are linked in different entity, data is:

client name      country name

client1 US

client1 Singapore

client2 Dubai


Main information form of EntityA:

Client Name: client1 (look up field)

Country List: US


Here US and Singapore values are dynamically added through Client Name textbox change event.

But when i try to save it is throwing an error as globally it does not have any items.


Please suggest me here.


Thank you. 




I am not quite certain how to achieve the functionality you are trying to get here. If you are trying to suggest an idea then maybe it would be better to make a post about it in our idea's form which I will like below; If you are trying to find a work around to this unfortunately I am not certain how to do this. You can always try creating a Microsoft Support case if you would like to go down that route. I'll include a link on how to create a case with them too.


If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so:








Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!


Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (37,456)