Using same id (not active one) - filemaker

I've got an issue with a button.
I've got clients, and these all have a number ( Clients:: ClientID). Now I want to make a button in another form and send the active clientID to another application which will use this clientID to display information in that application about that client.
Now I've made a button with the open URL which contains following code snippet:
"http://localhost:12345/showClientFile?clientid=" & Clients::ClientID
When I click the button in viewlayout, the application always (no matter which record I'm in) the same clientID and not the clientID from the record that I'm in. When I check the URL in the browser, it is also that same id constantly. Am I missing something?

If you're on a layout that isn't linked to the Clients table occurrence, then there must be a relationship from whichever TO your layout is linked to to the Clients table. Otherwise you wouldn't see any value for Clients::ClientID.
You say you want to send the "active clientID". How do you, or the system, know what the active clientID is? Is it stored in a global variable, as in $$_ACTIVE_CLIENT_ID, or perhaps a global field, Clients::g_active_client_id? When you can say to yourself, "When I want to know what the active client ID is, I look here," then you know what will need to be done to edit the URL calculation.
"http://localhost:12345/showClientFile?clientid=" & $$_ACTIVE_CLIENT_ID

Related

How to set AppClip invocation for URL with QueryParam?

I am trying to set the AppClip invocation for my App which is already released on app store.
I need an url such that it provides me a jobId e.g.: https://example.com/task?jobId=00001.
My use case is that I send the sms with the url https://example.com/task?jobId=00001 to the user, the user clicks on the url and the app gets started. Then for the other user I send the next url with corresponding jobId.
I did setup the AASA file for my domain (contains the JSON with "applinks" and "appclip" objects) which is valid, also the Domain status is valid on App Store Connect. There is a default experience set with title, subtitle, image and action. I also configured an advance experience for the url https://example.com/task.
However, my app clip doesn't get invoked if I access the url from either sms text or safari. :(
I do not have a web page for https://example.com/task therefore I haven't set up the meta data for this.
Is it possible to invoke the AppClip this way? It is really important for me that the URL is dynamic and I pass that jobId every time for each individual booking.
There s no much documentation and I already read at least twice Apple documentation about AppClip.
Because of this:
I do not have a web page for https://example.com/task therefore I haven't set up the meta data for this.
The answer to this:
Is it possible to invoke the AppClip this way?
Is no. Sorry, you need to own the domain you're working with, or at the very least have means to access its CNAME config (thus, be able to induce the owner of that domain to change the CNAME configs to what you want it to be, similar to what branch.io and AppsFlyer does with its users/clients).

PayPal , return page post values, how to access and use

I am wrestling with the PayPal service . I almost have it done . Last step, when the customer payed and has the last page, which stays open for 10 seconds and then redirects them to the page of your choosing.
What parameters, posts, etc are sent with that page opening? And how do I get access to them, so I can link the returning user with their created account (from ipn and my personalized database entry on the initial buyitnow)
I tried echo($_post). But it just shows .... Array() But no key value pairs.
I'd think there would be a lot more
I have rm=2. Set already.
Plus, I see some Get() cars in the URL but, nothing I can use .
Also, I am passing a custom variable , which is going through, and being used by the IPN to update the user account just fine. I just don't see how to connect the return page and the customer, preferably with the $custom var
Help?
Try using var_dump($_POST); instead of echo($_post);
Apparently, there are no POST variables coming from PayPal, they're all GET variables. A VAR_DUMP(GET) will show like 6 things, including your CUSTOM variable (id cm). I thought there would be more and it would be in POST format.
I also thought there would be a way to show everything, POST, GET, SESSION, etc. I even tried using Firefox NETWORK setting, but there were like 50 separate items. None of which seemed to contain my data. I'm sure it was there, but, hidden.

a coupon (unique code) for a like clicked. what is the best way

The unique code is given to whoever clicked like (only the first time he clicks)
in order to make sure that he is not going to have a unique code again. I have to have his fb id in my database, but I read that it is impossible to know the fb id of someone who clicks like. Is there a solution?
If the like button will be on my fun page, is it possible then?
I have already all the process of generating the unique code, and checking in my db if the code was used or know, I only have to keep in my db also the fb id to make sure he will not get more then once.
Create fangate (differentiate likers non-likers).
Is is_liker get user id with basic permissions.
On return after accepting the permission request check if user already got code.
If user never got code give him. Else display error message.

Saving changes to DB made in a webpage

I rewrote the title and content 3 times before posting it, I don't find the right way to ask this :P
I have a page that manage a list of notes, I have a CRUD on that page but the items are created and saved in javascript (using knockoutjs).
I create a new note, I add it to the model in javascript and it show up in the page.
The way Im saving the notes to the database is when I add it to the model, I send it via Ajax (async) to the server. So I have my note on screen and in the database really fast.
I send a note without Id to the server and EF will take care of the Id.
So far so good.
Imagine that I add a note but I dont refresh the webpage, so the note is in the database, is in the javascript model too but in the model it doesn't have the id yet.
I make some changes to the note and yeah, I want to update the note in the database... but... how?
I send my note to the server with the changes, but remember, the item still have no Id so I can't say:
Hey EF, give me the note with the ID == xx and we are going to update that note.
The others properties can be changed on the webpage so I have nothing that identifies the note apart from the Id, who doesn't work here.
I tried this:
Send the new note to the server, insert it on the database, retrieve it again (to pick the Id), send it back to javascript and update the object with the Id. So when I edit, I have the Id. Yeah, but the "save" call need to be sync and that destroy the experience.
Any ideas?
EDIT: The sync options is not that slow at the end but there have to be a async way and meh, the thing of "Insert on database", "Retrieve the last item I inserted" and "return back to the client" is a little hackish.
You could return the id of the new record in your asynch call. If you are using jQuery you can subscribe to the "success" callback and as long as your controller returns a JSON with the id of the new record you could update your model on the client side.
Even with this approach, you will need to have a way to identify the item updated on the client side (which is really the root of your question.) For that you can probably generate a random GUID on the client side, send it to the server when saving, and return it to jQuery when returning the ID so that you can identify the correct element to update on the page.

asp.net MVC QueryString

project type is MVC2. Let say that i have page1. after success it write somethink to row and get new inserted row id and redirect to another page and sends row id as parameter. and user can see this parameter on querystring. and can change it. i think so taht it is problem in some situation(pages). i use for it a hidden input and after post checking parameter from query string with hidden input value. if they are not equal then writing in to log and redirectiong to error page. does my way is correct. or have a good methods.
thanks...
Exposing IDs like this is pretty standard and is what lets browser bookmarking of specific items work. Your job is to ensure that the user can only see and modify records that they should be able to.
If the user does some URL-hacking and enters the URL to an item they are not allowed to see or modify, you can either just kick them back to the parent page, or give an Access Denied message, depending upon the app/context.
The bottom line is never trust user input, including hidden form parameters.