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: 8
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: 561
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
Marros View Drop Down
New Poster
New Poster
Avatar

Joined: 27.Nov.2018
Location: Raleigh, NC
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marros Quote  Post ReplyReply Direct Link To This Post Posted: 28.Nov.2018 at 11:52
Hi Steve, are you using the SOAP Fixed List widget yourself? Did you encounter any issues with it?
Back to Top
stevek View Drop Down
MetaCase
MetaCase
Avatar

Joined: 11.Mar.2008
Points: 561
Post Options Post Options   Thanks (0) Thanks(0)   Quote stevek Quote  Post ReplyReply Direct Link To This Post Posted: 28.Nov.2018 at 12:35
Sure, no problems here. Drop me a PM if you're having issues - most often it's just a question of the settings of the SOAP framework at the other end. 
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.