rivet Posted September 10, 2003 Posted September 10, 2003 I have a search page that the user gets to via an FMP-view URL From the DB which contains some image records I would like to pull and image from the relationship that short list all the images. -Since I get to the page via FMP-view I assumed that an Inline request is required. -The image is a url path -The path comes from a relationship. Between the InLine I have tried a straight field [FMP-Field: Name] and no problem. But when I try [FMP-Field: Relationship::Image,raw] and other variations, no luck. Here is my string: [FMP-InlineAction: -db={CurrentDatabase}, -lay={CurrentLayout}, _snA=646, -find]<img src="[FMP-Field: Relatioinship::Image,raw]" border="0">[FMP-Field: a_NameFull][/FMP-InlineAction]
Garry Claridge Posted September 10, 2003 Posted September 10, 2003 Is the field "Relatioinship::Image" on the Layout being used? Check the spelling of: Relatioinship::Image Relationship::Image All the best. Garry
rivet Posted September 11, 2003 Author Posted September 11, 2003 no I was just showing that it was a relationship
Steve T. Posted September 11, 2003 Posted September 11, 2003 Hi, rivet! I suppose you can use an INLINE ACTION since you used a -VIEW , but you can probably change the -VIEW to a -FIND (or ask the referrer to). Although I have tinkered w/inlines, my solutions always seemed to work better when I avoided them. I also got confused about the intratag braces and for which things they were needed (I thought it was not the obvious "just inside [ ]") and when to use quotes. I read that parts of the CDML Reference were incorrect or something. WRT Garry's Q, "Is the field "Relatioinship::Image" on the Layout being used?", I think he was just reminding folks that all fields need to be on the layouts used by the Web Companion or they don't show up and don't function properly. Even calc fields and the fields they use must be on the layout specified. --ST
Unable Posted September 11, 2003 Posted September 11, 2003 "... all fields need to be on the layouts used by the Web Companion or they don't show up and don't function properly. Even calc fields..." Golly gee, I've posted several Sample File Demos in the past month or so which display data from calc-fields which have been left off of the db file layout intentionally. No one has repored any trouble in regard to the display of that data. As to the relationship which Rivet is trying to display, I thought one of the reasons to use an inlineaction was that the relationship (:: through a field would not display, yet the inlineaction allowed data display through direct contact with the db file referenced by that relationship. Perhaps my understanding of theory is erroneous. Since this thread is titled "random image ..." I might suggest that instead of using a -view tag, a -findany tag will randomly select a record and will allow display of data from that record.Further linking to that record may be problematical however.
Steve T. Posted September 11, 2003 Posted September 11, 2003 Hi, Unable! (sigh) Well, you keep us honest and careful about what we say, eh? I guess what I meant to say (although maybe I'm still wrong, eh?) was... If you don't have a calc field on the layout, you cannot display it; if you do not have a field on a layout, you cannot take in values for it (assumption). As to your erroneous understanding of theory, I cannot comment because I did not understand your statement about displaying a relationship, but I agree w/your -findany suggestion provided every record in the db is a desirable candidate and that it is not a random pulling from a subset of records or other conditional criteria. Thanx (ouch) for pointing out my mistakes and/or sloppy language, however. We don't want to confuse anyone too much, right? -- ST
Unable Posted September 12, 2003 Posted September 12, 2003 "...If you don't have a calc field on the layout, you cannot display it;..." in the db file, but you can display data from it on a browser page. You can look at the Sample Files which I posted for clarification of your confusion Steve. Regarding the relationship (to which I referred as double colons), it is my understanding that [fmp-field: field_x::field_y] may not dispaly the data on the browser. Now if one uses an inlineaction to access the db wherein field_y resides, then one can access the data directly and display it. on the browser. That is my understanding of the theory.
Garry Claridge Posted September 12, 2003 Posted September 12, 2003 I haven't been able to display a Calc field, with CDML, which I do not have on the named Layout. All the best. Garry p.s. I am referring to an [FMP-InlineAction].
Unable Posted September 12, 2003 Posted September 12, 2003 Interesting, I haven't found it necessary to put one on a layout, but I haven't tried it with an inlineaction. I may need to try that. Of course with a -findany, if all that is wanted is to display data from a random record, an inlineaction is not needed. FYI the timedate demo uses 6 calc fields,and is only two format files. Really short demo.
Unable Posted September 12, 2003 Posted September 12, 2003 Well after lunch I spent a half hour constructing (and running) a new default which used a -findany to display data from one field of one record on the results page (using the db file from the operator values demo). That displayed as expected. On that results page I also used and inlineaction to call records from the db file I used in the timedate demo. In that inline I wrote code to display data from one of the text fields on the db file layout and two calc fields not on the db file layout. All three fields displayed the appropriate data. I still haven't found it necessary to put a calc field on a layout in order to display its data through a browser. FWIW, fields not on a layout do not show in Charlie B's D-Base (from his first offering).
Garry Claridge Posted September 12, 2003 Posted September 12, 2003 Re: two calc fields not on the db file layout. All three fields displayed the appropriate data If that is from an InlineAction, FM5 may be different from FM6. It certainly does not display the data from my system (FM6.0v4). Handy observation All the best. Garry
Unable Posted September 12, 2003 Posted September 12, 2003 Yes Garry, FMPro 5.0v.3, latest updaters. On the other hand, in 5.x, the format parameter does not work to display the date and text fields, and they must be formatted by calculation, as per the demo. Sounds like Pro 6 has lost functionality. Is anyone surprised? I prefer the calc field not on the layout (5.x) over the format parameter (6.x) in this instance. I would suggest greater security - always an issue with FMPro/Am.
rivet Posted September 13, 2003 Author Posted September 13, 2003 Hi guys, 1. all required fields are on my layout 2. FindAny wont work because the DB has a mix for record types, artist records and image records. 3. I think the porblem is that I have arrived at the page via -View. When I do a search from that page and have the error return to that page... bingo - I get my random image (-find action). So I will see if I can modify the InLine to search image records only.
Recommended Posts
This topic is 7812 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now