MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - External Element Doubt
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

External Element Doubt

 Post Reply Post Reply
Author
Message
cmorais View Drop Down
Member
Member
Avatar

Joined: 23.Mar.2018
Location: Ireland
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote cmorais Quote  Post ReplyReply Direct Link To This Post Topic: External Element Doubt
    Posted: 08.Aug.2018 at 12:30
I think it's a silly doubt, but I can't figure out yet.

So, I have a list of itens in a text file... I wish I could load it as a itens for a object.

As in "Volvo, ford, VW, FIAT", and when I create a new "Car" object, I can choose the "manufacturer" attribute from a list from this external file.

I looked all the external element property element, but I can't find a way to do this...

Is it possible?
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 552
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 08.Aug.2018 at 12:42
You can do that by using a String data type with a Fixed List widget, choosing Edit as Text for the values, and paste (or File | Insert File...) the file contents (which should be one per line). If you want to change the set of available values, just repeat.

If you want the set of values to be read on the fly each time the user is filling in such a property, you can use a SOAP Fixed List widget. You can then code whatever you want for the web service, e.g. to read a text file, fetch something from a database, grab some JSON from a REST service on the net etc.

(External Element widgets are for something different: their value is a URL or file name, so a model element can refer to an external file, and the modeller can easily open the target from the popup menu.)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 10.16
Copyright ©2001-2013 Web Wiz Ltd.

This page was generated in 0.047 seconds.