userName() returning different values for infopath 2010 form filler and web form [closed] - infopath2010

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I'm writing a form which uses userName() to get the user name and put it into a text box at form load if its not blank,this returns firstName.lastName when the form is filled by infopath form filler. However if the form is filled from a web form it returns some random characters followed by domain/firstName.lastName
Ideally I want the same from both and for it to be just firstName Lastname or FirstName.lastName
Currently I'm working around this by not enabling web forms but need to fix it as a lot of users don't have Infopath form filler.
I also need to fix this at the time of the rule being called as I use the field to form part of the file name also.
Any ideas on how to overcome this?

SharePoint loves to add random characters at the start of a username. I assume you are seeing something like "#15;" or something along those lines?
To fix this it would be done easiest in the code behind where you simply grab the field that is bound to the user name textbox and it will return a string.
Pretty much you have to parse the string, find the str.IndexOf('/') and create a substring starting at that index all the way to length -1. Then you can do a str.Replace('.', ' ') to change the period to a space.
Good luck!

Related

Update of requirement links on Azure DevOps [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last month.
Improve this question
Is it possible somehow to update all requirement links from (Successor/Predecessor) type to (Affected by/Affects) type automatically on project.
I didn't find any possible solution for it.
There isn't a built-in solution to do that automatically. However, you can try to write a script to call the Work Items - Update REST API to remove the Successor/Predecessor type links from a specify work item (requirement in your scenario), and then add the same links as the new type (Affected by/Affects).
Reference Remove a link sample to remove the Successor/Predecessor type links.
Reference Add a link sample to add the links as the new type Affected by/Affects.
Once you done that for a specify work item, then you call another REST API (Reporting Work Item Links - Get) to get all Requirement work items from the project, then change the type in a loop.

Fetch data from ID that keeps on changing at runtime having multiple <g> inside [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 2 months ago.
Improve this question
I am looking for a solution to fetch data from a tag which is having id as a unique attr and that keeps on changing at run time
Here is the image of the tag I want to fetch the value from this keeps on changing and the tag has no other attributes to use in Cypress.
I tried xpaths and cy.get() but none is helping.
...
..
If the element is part of a chart, there is little point in searching for the data-unique-id attribute, there are probably lots of the same element on the page.
One approach is to use traversal commands to work down from the chart root element - can be tricky to work out, but will be reliable.
There's some example tests here bahmutov/chart-testing-example
Another approach is to make your data available to the test by putting it into a property of the window (called App Actions). This saves you having to "screen-scrape" the elements.
If the structure of the id is consistent, you can use a regex with cy.get(). In this case, I'm assuming the id is always something like chart_XXXX_X.
// including a g tag
cy.get(/g\[data-unique-id="chart_\d{4}_\d"\]/)
// not including a g tag
cy.get(/\[data-unique-id="chart_\d{4}_\d"\]/)

Amazon KDP creator doesn't recognise table of contents from Google document [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
I'm trying to follow this advice here on how to format your TOC using a bookmark:
https://www.kdpcommunity.com/s/question/0D5f400000FHVFhCAP/google-docs-and-toc?language=en_US
But none of it works., My KDP pages still shows:
I do not believe the advice in that thread is accurate. If it is, I have been unable to replicate it. I have tried the following, none of which have worked:
Added Headings to the document and then auto-generating the ToC.
Additionally Bookmarking those headings
Changing the auto-generated ToC so it links to the Bookmarks rather than the headings.
Not using the auto-generated ToC and instead manually building one with links to Bookmarks
All of these will create a working table of contents which is not then recognised by KDP. I have not found any solution for getting a table of content generated in Google Docs (by any method) to show when upload to KDP. I assume this is because of the way Google Docs generates the Word doc which is required for KDP. The only workable solution appears to be to edit your document through a third party (either Word or some other package) once you've exported it from Google Docs.
I suspect there's a glitch in Amazon's programming. I have been uploading my books for years in Word with a manually created TOC that meets Smashwords' specifications (they're very picky). KDP always recognized the TOC until about a year ago. Suddenly even books that I've updated in a minor way and re-uploaded are marked as lacking a TOC. Yet when I opened their previewer, there's the TOC and I can click the links and they work fine. I appreciate that others have tried these multiple time-wasting attempts to fix the problem and that they don't work any better than my time-tasted (but no longer recognized) method.

Dialog box Handle in MFC [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am creating a dialog box for my Credential Provider.
For that I am creating a MFC CDialog box with three edit text labels for:
old password,
new password,
confirm password.
After creating dialog box I got an .exe file and its works fine, but I don't know how to get the values from the three edit text label.
While searching in net I saw handle which can do that, but there is no clear information, so can somebody tell me how to get the value of three edit text from .exe file.
Thanks in advance.
You are writing a Credential Provider.
As a reaction to some event you want to ask user for old and new passwords.
I your case you don't need to draw your own Dialog Box - you can just reveal and hide some fields of your Credential Provider as a reaction to this event.
I recommend you to look for CREDENTIAL_PROVIDER_USAGE_SCENARIO::CPUS_CHANGE_PASSWORD at MS Documentation.
It is described like your description of scenario.
Right click on the Edit control and use the class wizard to bind the control value to a CString member. OnOK() calls UpdateData(TRUE), which moves control data from the control value to the member variable. You can call UpdateData(TRUE) on certain events to update all the control members of your dialog class.

How to move document library sharepoint 2007 [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
We have one client requirement to move document library from one subsite to another.
While moving we should move all documents along with all the custom columns with its values as it is.
All the column value must remain same eg column name Modified By should contain same name after moving also.
in short like cut-paste
How we can do this?
Thanks,
Rushikesh
Try Sharepoint Content Deployment Wizard.
Use Data Synchronisation Studio http://www.simego.com/Products/Data-Synchronisation-Studio
You will need to use the extra add-in to keep the modified dates the same
There's a tool that allows you to copy all the properties from one list to another. It's called Sharegate (www.share-gate.com). There's a free trial that only limits the number of items that you can copy. The full version of the software is sold at 375$ which is a no brainer for most of the company. Hopefully, this will help you!
definitely saving as a template and check the box to save all content, then going to the new site and upload the template## I hard somewhere that could be done in explorer view but...never tried this approach...
You can save the list as a template and check the box to 'include content'. Then just copy over the template and create a new doc. lib. using it. It will have all of the documents as well as the same columns, values for those columns, etc.

Resources