Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Jeffrey Ferreira

#1
Nomads / Re: Drag and Drop a File
July 16, 2024, 04:23:32 PM
Hi Mike - thank you. this worked for me.
#2
Nomads / Re: Drag and Drop a File
July 10, 2024, 02:47:26 PM
thank you Mike - i will give it a try.
#3
Nomads / Drag and Drop a File
July 10, 2024, 11:07:48 AM
this is probably totally pie in the sky...
is there any way in pxplus that i can drop a file on to something say like from Email Outlook on to a control and get access to that file in some way.
what i'm trying to do is associate a pdf with an invoice or quote.
#4
Nomads / Re: Sort On Header Click / Row Height
June 07, 2024, 02:34:25 PM
I will give that a try Jane. Thank you.
#5
Nomads / Re: Sort On Header Click / Row Height
June 07, 2024, 11:02:57 AM
Hi Jane,

So the problem that usually brings about these queries is the Customer, Vendor Name would be something like this:
Mast Road and Grain
and they want to search for Grain

This is my conundrum. The pxplus standard queries work fine when using the keys and typing in first few letters of key.

this is more like a key word search thru the entire row of data.

maybe there is no solution for this - i have coded around it before by checking to see if they clicked on Row -1 and executing Sort Logic myself but i was trying to avoid.

jeff
#6
Nomads / Sort On Header Click / Row Height
June 06, 2024, 07:44:00 PM
Hello,

I sometimes make custom queries where as the user types into a multi-line I hide rows via the RowHeight property to zero for those rows that don't meet search criteria. Customers seem to really like it, the only problem is when they ask me to enable 'SortOnHdrClick.

If i filter rows via the row height then if they click a column it just messes it up.
is there a way i can do both / hide rows and still have sort on header click enabled

jeff
#7
i think the problem is this line
Content-Disposition: form-data; name="xmlsing"; filename="xmlsing.xml"

Mine looks like this
Content-Disposition: form-data; name="filename"; filename="s:\jeff\Cleary_Quote.xml"

i feel like your line should like something like this:

Content-Disposition: form-data; name="filename"; filename="xmlsing.xml"
in other words
the value that name =  points to should be the key in the next key value pair
i have to head out but i'll try to check back in again later on this.
                                                           
#8
Henderson, for me the problem was that keyword file/filename that i had to pass in.
i feel like you might have to pass in the word "xml"
i could be wrong.
do me a favor - you know where i have
1080 let BODY$=UPLOAD'BODY$() ! Calling Stephane's code
after you execute this method
print the mid(body$,1,300) and then send the contents to this thread...
#9
Hi Henderson,

here was is my best try to scale down with no extra stuff
you need Stephane's program http.upload.pvc for this to work. The other stuff is standard pxplus.
if you can't get it working let me know.

0010 begin
0020 precision 4
0030 let XML_FILE$="s:\jeff\Cleary_Quote.xml" ! Your File would be different
0040 let RAW_CREDENTIALS$="login:password" ! Using Basic Credentials then separate your login and password with a colon before calling base64 program
0050 call "*web/base64;ENCODE_STR",RAW_CREDENTIALS$,BASE64_CREDENTIALS$
0060 let EXTRA_HEADERS$="Authorization: Basic "+BASE64_CREDENTIALS$
0070 let URI$="https://staging.saberis.com:9000/api/v1/documents/modules/21/upload"
0080 gosub HELPER
0090 call "*plus/web/request",URI$,BODY$,RESPONSE$,RESPONSE_HEADER$,CONTENT_TYPE$,"",EXTRA_HEADERS$
0100 print RESPONSE_HEADER$
0110 print RESPONSE$
0120 msgbox "Done"
0130 end
1000 ! ^1000
1010 HELPER:
1020 let FIELD_NAME$="filename" ! This part was custom for my api / yours will probably be different
1040 call "*tools/readfile",(XML_FILE$),FILE_CONTENTS$
1050 let FILE_MIME_TYPE$="multipart/form-data"
1060 let UPLOAD=new("http.upload",FIELD_NAME$,XML_FILE$,FILE_CONTENTS$,FILE_MIME_TYPE$) ! This is Stephane's program http.upload.pvc that handles the boundaries (this is part i was messing up (the boundaries))
1070 let CONTENT_TYPE$=UPLOAD'CONTENT_TYPE$
1080 let BODY$=UPLOAD'BODY$()
1090 return
#10
Hi,

i got it to work  :) with Stephane's helper class.
thank you so much.
at least the response said message queued and i'm pretty sure that means it worked.
i have to read thru Stephane's class now and figure out what on earth he did.

jeff
#11
Here is my curl command that worked

curl -k  -H "Content-Type: multipart/form-data" -H "Authorization: Basic  Base64Credentials" -F file[filename]=@s:\jeff\Cleary_Quote.xml -X POST https://staging.saberis.com:9000/api/v1/documents/modules/21/upload

i'm going to try adding in what Stephane said and see if that helps.
#12
Hi Mike, i tried your method...
of course i know i'm doing something wrong.
but i think it might have something to do with what Stephane said
the api says i have to  reference a field name and a filename

Here is there sample post below.....maybe i have to try sending this filename somewhere..
i'm going to try and find my curl command that worked and attach.

POST /api/v1/documents/modules/17/upload HTTP/1.1
Host: {host}
Authorization: Basic [BASIC_ENCODED_LOGIN_INFORMATION]=
Cache-Control: no-cache
Content-Type:https://forum1.pvxplus.com/Themes/vVide/images/bbc/bold.gif multipart/form-data; boundary=----
WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"; filename="Paradigm.xml"
Content-Type: text/xml
------WebKitFormBoundary7MA4YWxkTrZu0gW--


#13
Web Services / Posting a File to a Web Service
May 17, 2024, 09:47:02 PM
Hi List,
in the past i could never get *plus/web/request work with uploading a file.
i can get it to work in postman, curl and powershell....but i cannot get syntax right in pxplus
i'm referring to line 100 .
does anyone know what i'm doing wrong or has used *plus/web/request to post/upload file
i dont want to use a 3rd party utility if i can help it

0040 let RAW_CREDENTIALS$="username:password"
0050 call "*web/base64;ENCODE_STR",RAW_CREDENTIALS$,BASE64_CREDENTIALS$
0060 let EXTRA_HEADERS$="Authorization: Basic "+BASE64_CREDENTIALS$
0070 let MIME_TYPE$="multipart/form-data"
0080 let URI$="https://staging.saberis.com:9000/api/v1/documents/modules/21/upload"
0100 let BODY$="filename=Cleary_Quote.xml"
0110 call "*plus/web/request",URI$,BODY$,RESPONSE$,RESPONSE_HEADER$,MIME_TYPE$,"",EXTRA_HEADERS$


thanks

jeff
#14
ODBC / Re: ODBC Service Crashing
April 26, 2024, 09:49:28 AM
Hi Deven,

The Power BI Reports are specific to this one company so no it is only happening at this company. But i have more companies asking to query data using power bi

jeff


#15
ODBC / Re: ODBC Service Crashing
April 26, 2024, 09:18:00 AM
I upgraded to version 7.10 and the service still crashes with this generic error.  The problem is I keep having more and more customers wanting to use Power BI to connect to our data.